Ask your own question, for FREE!
Computer Science 16 Online
OpenStudy (alexanderphantomhive):

Samuel is working on decimal and binary conversion for his college project. He is using the binary number 111011 and wants to explain its conversion to the decimal number 59. Which formula will Samuel use to explain the conversion? a) 1 x 25 + 24 + 1 x 23 + 0 x 22 + 1 x 21+ 1 x 20 b) 0 x 25 + 1 x 24 + 1 x 23 + 0 x 22 + 1 x 21+ 1 x 20 c) 0 1 x 25 + 1 x 24 + 1 x 23 + 0 x 22 + 1 x 21+ 1 x 20 d) 20 x 1 + 21 x 1 + 22 x 0 + 23 x 1 + 24 x 1 + 25 x 1 e) 1 x 25 + 1 x 25 + 22 x 0 + 23 x 1 + 24 x 1 + 25 x 1

OpenStudy (google):

i cant do this stuff

OpenStudy (alexanderphantomhive):

Tag someone who can?

OpenStudy (google):

not many people do this anymore

OpenStudy (alexanderphantomhive):

ugh.. ;-;

OpenStudy (google):

yeah i hated doing it, i always had someone do it for me

OpenStudy (alexanderphantomhive):

Slenderrr is here!! Yay!

OpenStudy (slenderman):

i did my own binary code before, but ive never ran into stuff like this

OpenStudy (alexanderphantomhive):

&^#$@%!!

OpenStudy (alexanderphantomhive):

do either of you know any users that are good with this stuff?

OpenStudy (slenderman):

maybe @TheSmartOne

OpenStudy (alexanderphantomhive):

Darn. He's offline

OpenStudy (slenderman):

ill see if i can find some math nerds

OpenStudy (otherworldly):

Its not b @AlexanderPhantomhive

OpenStudy (otherworldly):

For c theres a 0 and a 1 at the beginning which on is it?

OpenStudy (otherworldly):

one*

OpenStudy (alexanderphantomhive):

I thought it was A

OpenStudy (saksh1998):

well if by 25 you mean 2^5 and so on then the answer is c

OpenStudy (theeric):

Hi! This stuff might not be commonly needed in code, but that depends on the code you're working on. Many people use "high-level" languages, which look more readable and each line of code does more work for you. It does the thinking for you, but it doesn't necessarily address "what is the most efficient way to do what I need done?" When you need to be really efficient (space or time), lower-level understanding can come into play. This is a question with the binary number system. So, how is a number represented in memory. With common electronics, you have two states - on and off. So having only two numbers, 1 and 0, represents one electronic component per digit! Very strong tie to the hardware, very good for working as efficiently as possible. But, even with only two numbers per spot, we need a way to represent numbers like 59. And there's the binary system (two possible values per digit) that works just like that. One digit is simple. It's 1 or 0. Two digits is not simple, so here it is. If the left digit is "0", then we mean the whole number is our decimal "0". If the left digit is "1", then this digit adds "2" (not 1) to the total number. Why "2"? Well, that's just like our decimal system. When you see 10, that's a one and zero but it means ten. The first digit is "0" and that means 0. The second digit is "one", but that means we add ten. Why "ten" for our decimal numbers and "two" for binary? Well, it's the purpose of having more digits. Normally, we have 0, 1, 2, 3, 4, 5, 6, 7, 8, and 9. To get more we add a digit, and the "1" we tack on before "0" in "10", for decimal, means 10. So, we have 11 in binary is split up so the right digit adds a decimal 1 and the left digit adds a decimal 2. The whole number is our decimal 2+1=3. Each digit means something different. Decimal: 1 one 10 ten 100 one hundred Binary 1 one 10 two 100 four Each digit in decimal is ten more tens of the previous digit. Each digit in binary is two more twos of the previous digit. Decimal right-most digit: 0 tens is 1 next digit: ten more of 1 is 10 next digit: ten more of 10 is 100 next digit: ten more of 100 is 1000 next digit: ten more of 1000 is ... Binary right-most digit: 0 twos (1) next digit: two more of 1 is 2 next digit: two more of 2 is 4 next digit: two more of 4 is 8 next digit: two more of 8 is ... Shortcut? For binary: right most digit is one. next digit is 2. next digit is 2 x 2. next digit is 2 x (2 x 2). The easier way to write this is: right most digit is \(2^0\). next digit is \(2^1\). next digit is \(2^2\). next digit is \(2^3\). So what's happening is this: 111011 right-most digit means \(1\times2^0=1\) next digit means \(1\times2^1=2\) next digit means \(0\times2^2=0\) next digit means \(1\times2^3=8\) next digit means \(1\times2^4=16\) next digit means \(1\times2^5=32\) sum: \(1+2+0+8+16+32=59\) A.k.a.: \(\small{\Large1}\times2^5+{\Large1}\times2^4+{\Large1}\times2^3+{\Large0}\times2^2+{\Large1}\times2^1+{\Large1}\times2^0\) That looks a lot like option C.

OpenStudy (theeric):

It also looks a lot like option A. But I guess the difference is that option A has \(2^4\) instead of \(1\times2^4\), and \(1\times2^4\) is more descriptive of Samuel's process.

OpenStudy (theeric):

Option B is clearly wrong because the \(2^5\) digit is not "0". Option E is clearly wrong because there are many \(2^5\) there, which doesn't describe Samuel's process. Option D is mathematically correct, but maybe doesn't read as well? I would see if your professor has a specific process to get an equation, maybe from a worksheet, book, or lecture.

Can't find your answer? Make a FREE account and ask your own questions, OR help others and earn volunteer hours!

Join our real-time social learning platform and learn together with your friends!
Can't find your answer? Make a FREE account and ask your own questions, OR help others and earn volunteer hours!

Join our real-time social learning platform and learn together with your friends!