Students

Teachers & SchoolsStudents

Teachers & SchoolsAP Computer Science 2.2 Review of the Basics. What is 23 (base 10) in base 2?

AP | AP Computer Science |

AP Computer Science | Review of the Basics |

Computer Science | AP Computer Science |

Language | English Language |

Standard Operations and Algorithms | Searching |

Test Prep | AP Computer Science |

base to also known as binary while all major modern

civilizations used base ten numeral system and for good reason

Over tens of thousands of years we've come to realise

that ten fingers are really easy to countless when dealing

with a number higher than ten you just roll over

into a new set of ten it's about a simple

is it gets for us computers though think in terms

of off and on zero and one well that's all

well and good for counting up to zero in one

but we're two larger numbers come from and how are

they stored in a computer's memory Will the answer their

lives in using lots of zeros and ones zero or

one in memory is of idiot and with just eight

bits that are known as one bite you can count

all the way from zero to two hundred fifty five

each bit represents a different amount so starting from the

right side the first bit represents one If that first

bid is on or one we have a total value

in our bite of one The next bit over represents

two but here's where it begins to get oh so

clever bit after that represents four and the one after

that ate and after that sixteen and so on using

the power says too by flipping each differently valued bid

on or off we can count all the way up

to two hundred fifty five just add up which bits

are on and there's your number so this for example

is one hundred sixty seven right here and here's a

forty eight and here is two hundred anyway let's count

twenty three way already know that the fifth bit represent

sixteen so we'll turn that one on remember binary goes

from right to left How about the fourth bit representing

eight right here Eight plus sixteen would leave twenty for

which is over our target of twenty three so we'll

leave the fourth bidden as zero The third bit four

plus sixteen is twenty so yea progress second bit is

to turn our twenty two and the first bit is

one so turned that toe one and now when we

add it all up where twenty three or zero zero

zero one zero one one one in base too trailing

zeros can be left off and we're left with one

zero one one one that's Answer eh Well that was 00:02:51.25 --> [endTime] easy actually Quite difficult No