0% found this document useful (0 votes)
32 views

Binary To Decimal

The document provides examples of converting binary numbers to decimal numbers. It explains that this is done by adding up the place values of each 1 digit in the binary number based on its position, with the rightmost digit having the lowest place value of 20=1. Several examples are shown of expanding binary numbers like 1001012, 100011102, 1111100002 and calculating their equivalent decimal values by determining the place values of digits with a value of 1.

Uploaded by

Corx Bautista Ü
Copyright
© Attribution Non-Commercial (BY-NC)
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
32 views

Binary To Decimal

The document provides examples of converting binary numbers to decimal numbers. It explains that this is done by adding up the place values of each 1 digit in the binary number based on its position, with the rightmost digit having the lowest place value of 20=1. Several examples are shown of expanding binary numbers like 1001012, 100011102, 1111100002 and calculating their equivalent decimal values by determining the place values of digits with a value of 1.

Uploaded by

Corx Bautista Ü
Copyright
© Attribution Non-Commercial (BY-NC)
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 4

Here are some examples of converting binary directly into decimal.

We simply add up the place values of each 1 digit in the binary number.
y

1001012 = 3710: Exponents Place Values Bits Value 25 24 23 22 21 2 0 2


0

32 16 8 4 1 0 0 1 32 + 4

1 1 + 1 = 37

100011102 = 14210: Exponents Place Values Bits Value 27 26 25 24 23 22 21 2


0

128 64 32 16 8 4 2 1 0 0 0 1 1 1 128 + 8 + 4 + 2

1 0 = 142

1111010002 = 48810:
Exponents Place Values 28 256 27 128 26 64 25 24 32 16 23 22 21 8 4 2 2
0

Bits Value
y

1 1 1 1 0 1 256 + 128 + 64 + 32 + 8

0 = 488

101101012 = 18110:
Exponents Place Values Bits Value 27 1 2 8 1 1 2 8 26 64 0 25 32 1 24 16 1 23 8 0 22 4 1 + 4 21 2 0 20 1 1 + 1 = 181

+ 32 + 16

CONVERTIN G BINARY TO DECIMAL


Steps: 1. Get the last digit of the hex number, call this digit the currentDigit. 2. Make a variable, let's call it power. Set the value to 0. 3. Multiply the current digit with (2^power), store the result. 4. Increment power by 1. 5. Set the the currentDigit to the previous digit of the hex number. 6. Repeat step 3 until all digits have been multiplied. 7. Sum the result of step 3 to get the answer number. Example Convert BINARY 11101 to DECIMAL NOTES MULTIPLICATION RESULT

start from the last digit, which is 1, multiply that digit with 2^0, note that the power of 0 of any 1*(2^0) number is always 1 11101 (current digit is in bold) process the previous digit, which is 0, multiply that digit with the increasing power of 2 0*(2^1)

11101 (current digit is in bold) process the previous digit, which is 1, note that 2^2 means 2*2 1*(2^2) 11101 (current digit is in bold) process the previous digit, which is 1, note that 2^3 means 2*2*2 1*(2^3) 11101 (current digit is in bold) process the previous digit, which is 1, note that 2^4 means 2*2*2*2 1*(2^4) 11101 (current digit is in bold) here, we stop because there's no more digit to process this number comes from thesum of the RESULTS ANSWER 29

16

Basically, this is the same as saying: 1*(2^4) + 1*(2^3) + 1*(2^2) + 0*(2^1) + 1*(2^0) or 1*(16) + 1*(8) + 1*(4) + 0*(2) + 1*(1) The reason it's easier to start backward is because:
y y

Counting the number of digits takes extra time, and you might count wrongly. If you don't remember what a particular power-of-2 value, it's easy to calculate it from the previous value. For instance, if you don't remember what the value of 2*2*2 is, then just double the value of 2*2 (which you already have if you had started backward).

Another Example Convert BINARY 1010 to DECIMAL MULTIPLICATION RESULT

0*(2^0) 1*(2^1) 0*(2^2) 1*(2^3) ANSWER

0 2 0 8 10

Is constructing a table like above required? No, it just depends on your preference. Some people are visual, and the table might help. Without a table, it's also easy. If you want to be a speed counter, just remember that the value of the multiplier is always the double of the previous one. 1, 2, 4, 8, 16, 32, 64, 128, 256, 512, ... POWER OF 2s 2^0 2^1 = 2 2^2 = 2*2 2^3 = 2*2*2 2^4 = 2*2*2*2 RESULT 1 2 4 8 16

Example Convert BINARY 1010001 to DECIMAL. Again, I'm starting backward here:
(1*1) + (0*2) + (0*4) + (0*8) + (1*16) + (0*32) + (1*64) = 1 + 0 + 0 + 0 + 16 + 0 + 64 = 81

You might also like