Professional Documents
Culture Documents
Systems
Introduction
• Examples:
– A416
– 107H16
– 12B16
CONVERSION
Decimal to Binary
Decimal to Octal
Decimal to Hexadecimal
Decimal to Binary
16 8 4 2 1
3. Since 16 fits, write a 1 for the leftmost
binary digit, and subtract 16 from your
decimal number, 29. 29 -16 = 13
24 23 22 21 20
16 8 4 2 1
1
4. Move to the next lower power of two. Can
13 fit into 8? Yes, So write a 1, and
subtract 8 from 13. 13 - 8 = 5
24 23 22 21 20
16 8 4 2 1
1 1
5. Move to the next lower power of two. Can
5 fit into 4? Yes, So write a 1, and
subtract 5 from 4. 5 - 4 = 1
24 23 22 21 20
16 8 4 2 1
1 1 1
6. Move to the next lower power of two. Can
1 fit into 2? No, So write a 0.
24 23 22 21 20
16 8 4 2 1
1 1 1 0
7. Move to the next lower power of two. Can
1 fit into 1? Yes, So write a 1, and
subtract 1 from 1. 1-1 = 0
24 23 22 21 20
16 8 4 2 1
1 1 1 0 1
Binary to Decimal
Binary to Octal
Binary to Hexadecimal
Binary to Decimal
Converting binary to decimal is very simple.
Octal to Decimal
Octal to Binary
Octal to Hexadecimal
Octal to Decimal
1. List the powers of eight in a "base 8 table"
from right to left. Start at 80, evaluating it
as "1". Increment the exponent by one for
each power. It would look like this:
84 83 82 81 80
4096 512 64 8 1
Example: 1278
82 81 80
1 2 7
Octal to Decimal
2. Multiply the value in each position by its
Octal weight and add each value.
82 81 80
1 2 7
1*64 2*8 7*1
64+16+7 = 87
Hexadecimal to Decimal
Hexadecimal to Binary
Hexadecimal to Octal
Hexadecimal to Decimal
1. List the powers of eight in a "base 16
table" from right to left. Start at 160,
evaluating it as "1". Increment the
exponent by one for each power. It would
look like this:
163 162 161 160
4096 256 16 1
Example: B6E16
162 161 160
B 6 E
Hexadecimal to Decimal
2. Multiply the value in each position by its
Octal weight and add each value.
162 161 160
B 6 E
11*256 6*16 14*1
2816 + 96 + 14 = 2926