Introduction To Computer Architecture
Introduction To Computer Architecture
45 ÷ 2 = 22 remainder 1
22 ÷ 2 = 11 remainder 0
11 ÷ 2 = 5 remainder 1
5 ÷ 2 = 2 remainder 1
2 ÷ 2 = 1 remainder 0
1 ÷ 2 = 0 remainder 1
Binary: 101101
Decimal to Hexadecimal:
Hexadecimal: 2D
Decimal to Octal:
45 ÷ 8 = 5 remainder 5
5 ÷ 8 = 0 remainder 5
Octal: 55
Converting Binary to Hexadecimal and Octal
Binary to Hexadecimal:
Group the binary digits into sets of 4, starting from the right.
Add leading zeros if needed.
Convert each group of 4 binary digits to its hexadecimal
equivalent.
Example:
Convert binary 101101 to hexadecimal:
Hexadecimal: 2D
Binary to Octal:
Group the binary digits into sets of 3, starting from the right.
Add leading zeros if needed.
Convert each group of 3 binary digits to its octal equivalent.
Example:
Convert binary 101101 to octal:
Octal: 55
Converting Hexadecimal and Octal to Binary
Hexadecimal to Binary:
2 = 0010
D = 1101
Binary: 00101101
Octal to Binary:
5 = 101
5 = 101
Binary: 101101
Summary of Conversion Table: