100 likes | 292 Views
Objectives. In these slides you will learn: How to convert from hexadecimal to binary How to convert from hexadecimal to binary. Hexadecimal Numbers. The HEXADECIMAL number system is a number system which consists of 10 digits and 6 letters as follows:
E N D
Objectives • In these slides you will learn: • How to convert from hexadecimal to binary • How to convert from hexadecimal to binary H. Mundo – Computer Science
Hexadecimal Numbers • The HEXADECIMAL number system is a number system which consists of 10 digits and 6 letters as follows: 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, A, B, C, D, E, F • How do decimal, Binary and Hexadecimal compare to each other? H. Mundo – Computer Science
1 0 E Base-16 (hexa) number: Note: ignore leading 0s on the most significant binary number. 0s on the left don’t count. So Hexadecimal to Binary • Algorithm: • Convert each hexadecimal digit to binary using four bits for each digit Example 1:covert to 10E to binary
A 8 B Base-16 (hexa) number: So Hexadecimal to Binary • Algorithm: • Convert each hexadecimal digit to binary using four bits for each digit Example 2:covert to A8B to binary
F 2 D Base-16 (hexa) number: So Hexadecimal to Binary • Algorithm: • Convert each hexadecimal digit to binary using four bits for each digit Example 1: covert to F2D to binary
1 0 0 0 1 1 0 1 0 1 0 1 Base-16 (hexa) number: So Binary to Hexadecimal • Algorithm: • Starting from right to left, group bits in groups of 4. • Convert each group to hexadecimal • The resulting represents the hexadecimal number • NOTE: a group of for bits in binary will never exceed 15 Example 1: convert (100011010101) to hexa
1 0 1 0 0 1 1 1 0 1 Base-16 (hexa) number: So Binary to Hexadecimal • Algorithm: • Starting from right to left, group bits in groups of 4. • Convert each group to hexadecimal • The resulting represents the hexadecimal number • NOTE: a group of for bits in binary will never exceed 15 Example 2: convert (1010011101) to hexa
11 1011 1111 0111 Base-16 (hexa) number: So Binary to Hexadecimal • Algorithm: • Starting from right to left, group bits in groups of 4. • Convert each group to hexadecimal • The resulting represents the hexadecimal number • NOTE: a group of for bits in binary will never exceed 15 Example 3: convert (11101111110111) to hexa