Presentation is loading. Please wait.

Presentation is loading. Please wait.

The Hexadecimal Number System Representation of Data in Computer Systems.

Similar presentations


Presentation on theme: "The Hexadecimal Number System Representation of Data in Computer Systems."— Presentation transcript:

1 The Hexadecimal Number System Representation of Data in Computer Systems

2 Activity 1 2 minutes to convert the following hex numbers into denary: 1A B2 CA 161 1 1

3 Representing Numbers in Hexadecimal

4 Representation of Data in Computer Systems Remembering Hex As we know, computers can only deal with 2 numbers (0 and 1). The problem for computer scientists is that very quickly, a fairly small number like 258 (3 digits long) becomes the massive binary number of 100000010 (9 digits!) To solve this issue, computer scientists came up with another number system to help them deal with base two numbers (binary) but without the long string of digits ! Learning Objectives: Numbers: c)Convert positive denary whole numbers (0-255) into 2-digit hexadecimal number and vice versa d)Convert between denary and hexadecimal equivalents of the same number e)Explain the use of hexadecimal to represent binary numbers.

5 Representation of Data in Computer Systems The Hexadecimal Number System The hexadecimal number system has place values which increase by the power of 16: Learning Objectives: Numbers: c)Convert positive denary whole numbers (0-255) into 2-digit hexadecimal number and vice versa d)Convert between denary and hexadecimal equivalents of the same number e)Explain the use of hexadecimal to represent binary numbers. 256161 101 = 257

6 Representation of Data in Computer Systems Remembering the Hexadecimal Number System Because the second column is 16, we have to count to 15 in the 1s column before we can place a 1 in the 16s column But in all number systems, placing two digits in one column is not allowed. So in the Hexadecimal Number System we have to use new symbols to represent 11, 12, 13, 14 and 15. And what we use is letters! Learning Objectives: Numbers: c)Convert positive denary whole numbers (0-255) into 2-digit hexadecimal number and vice versa d)Convert between denary and hexadecimal equivalents of the same number e)Explain the use of hexadecimal to represent binary numbers. 161 Hexadecimal Place Values 161 015 161 10

7 Representation of Data in Computer Systems The Hexadecimal Number System Learning Objectives: Numbers: c)Convert positive denary whole numbers (0-255) into 2-digit hexadecimal number and vice versa d)Convert between denary and hexadecimal equivalents of the same number e)Explain the use of hexadecimal to represent binary numbers. 161 Hexadecimal Place Values Base 10Base 2Base 16 00 0 11 1 210 2 311 3 4100 4 5101 5 6110 6 7111 7 81000 8 91001 9 101010 A 111011 B 121100 C 131101 D 141110 E 151111 F

8 Representation of Data in Computer Systems Converting Hexadecimal into Denary If the hex number was AF… …we simply count the number of 16s together with the number of 1s Learning Objectives: Numbers: c)Convert positive denary whole numbers (0-255) into 2-digit hexadecimal number and vice versa d)Convert between denary and hexadecimal equivalents of the same number e)Explain the use of hexadecimal to represent binary numbers. 161 Hexadecimal Place Values 161 AF 160 + 15 175 Ten 16s Fifteen 1s

9 On your whiteboards Convert the following hex number into denary: E2

10 On your whiteboards Convert the following hex number into denary: CE

11 Representation of Data in Computer Systems Converting Denary into Hexadecimal This is a little harder… We use the following method: -Count how many 16s fit into the number -Place the answer in the 16s column -Place the remainder in the 1s column Learning Objectives: Numbers: c)Convert positive denary whole numbers (0-255) into 2-digit hexadecimal number and vice versa d)Convert between denary and hexadecimal equivalents of the same number e)Explain the use of hexadecimal to represent binary numbers. 161 Hexadecimal Place Values 161 Example: Convert 20 into Hex How many 16s fit into 20? 1 Remainder? 4 1 4

12 Representation of Data in Computer Systems Converting Denary into Hexadecimal This is a little harder… We use the following method: -Count how many 16s fit into the number -Place the answer in the 16s column -Place the remainder in the 1s column Learning Objectives: Numbers: c)Convert positive denary whole numbers (0-255) into 2-digit hexadecimal number and vice versa d)Convert between denary and hexadecimal equivalents of the same number e)Explain the use of hexadecimal to represent binary numbers. 161 Hexadecimal Place Values 161 Example: Convert 235 into Hex How many 16s fit into 235? 14 Remainder? 11 E B

13 On your whiteboards Convert the following number into Hexadecimal: 174

14 On your whiteboards Convert the following number into Hexadecimal: 162

15 Representation of Data in Computer Systems Why Hexadecimal? The question that many people ask is why do computer scientists use hexadecimal?...fewer digits?...that is one reason So why not just use Denary? It is because it is easy to convert between Hex and Binary ! Learning Objectives: Numbers: c)Convert positive denary whole numbers (0-255) into 2-digit hexadecimal number and vice versa d)Convert between denary and hexadecimal equivalents of the same number e)Explain the use of hexadecimal to represent binary numbers. 161 Hexadecimal Place Values 100000010 in binary ( 9 digits ) is 102 in hexadecimal ( 3 digits ) But it is still just 258 in Denary ( also 3 digits )

16 Representation of Data in Computer Systems The ease of converting between hex and binary… 161 Hexadecimal Place Values 1286432168421 10011100 Binary: Hex: 9C Notice anything?... Learning Objectives: Numbers: c)Convert positive denary whole numbers (0-255) into 2-digit hexadecimal number and vice versa d)Convert between denary and hexadecimal equivalents of the same number e)Explain the use of hexadecimal to represent binary numbers.

17 Representation of Data in Computer Systems The ease of converting between hex and binary… 161 Hexadecimal Place Values Binary: Hex: 9C What about if we split the byte into nibbles?... 8421 1001 8421 1100 C = 12 1100 = 12 C = 1100 9 hex = 9 den 1001 = 9 den 9 hex = 1001 Learning Objectives: Numbers: c)Convert positive denary whole numbers (0-255) into 2-digit hexadecimal number and vice versa d)Convert between denary and hexadecimal equivalents of the same number e)Explain the use of hexadecimal to represent binary numbers. 1286432168421 10011100

18 Representation of Data in Computer Systems So, to convert binary into hex we: 1.Split the binary byte into two nibbles 2.The left nibble is your left hex number 3.The right nibble is your right hex number 161 Hexadecimal Place Values Binary: Hex: 9 8421 1001 8421 1100 Learning Objectives: Numbers: c)Convert positive denary whole numbers (0-255) into 2-digit hexadecimal number and vice versa d)Convert between denary and hexadecimal equivalents of the same number e)Explain the use of hexadecimal to represent binary numbers. C

19 Representation of Data in Computer Systems Convert this binary number into Hex… 161 Hexadecimal Place Values 1286432168421 11011101 Binary: 8421 1101 8421 1101 Step 1 (Split into nibbles) Step 2/3 (Convert each nibble into Hex) D Learning Objectives: Numbers: c)Convert positive denary whole numbers (0-255) into 2-digit hexadecimal number and vice versa d)Convert between denary and hexadecimal equivalents of the same number e)Explain the use of hexadecimal to represent binary numbers. D

20 Representation of Data in Computer Systems Convert this binary number into Hex… 161 Hexadecimal Place Values 1286432168421 00011111 Binary: 8421 0001 8421 1111 Step 1 (Split into nibbles) Step 2/3 (Convert each nibble into Hex) 1 Learning Objectives: Numbers: c)Convert positive denary whole numbers (0-255) into 2-digit hexadecimal number and vice versa d)Convert between denary and hexadecimal equivalents of the same number e)Explain the use of hexadecimal to represent binary numbers. F

21 On your whiteboards Convert the following binary numbers into Hexadecimal: 1286432168421 11100111

22 On your whiteboards Convert the following binary numbers into Hexadecimal: 1286432168421 10100101

23 Representation of Data in Computer Systems Convert from Hex to Binary… This is also easy…it is simply the reverse of the previous method: 161 Hexadecimal Place Values 1286432168421 (0) 111101 Hex: 8421 0011 8421 1101 Step 1 (convert each hex digit into nibbles) Step 2 (Join the nibbles together) 3D Learning Objectives: Numbers: c)Convert positive denary whole numbers (0-255) into 2-digit hexadecimal number and vice versa d)Convert between denary and hexadecimal equivalents of the same number e)Explain the use of hexadecimal to represent binary numbers.

24 Representation of Data in Computer Systems Convert from Hex to Binary… This is also easy…it is simply the reverse of the previous method: 161 Hexadecimal Place Values 1286432168421 10101011 Hex: 8421 1010 8421 1011 Step 1 (convert each hex digit into nibbles) Step 2 (Join the nibbles together) AB Learning Objectives: Numbers: c)Convert positive denary whole numbers (0-255) into 2-digit hexadecimal number and vice versa d)Convert between denary and hexadecimal equivalents of the same number e)Explain the use of hexadecimal to represent binary numbers.

25 On your whiteboards Convert the following Hexadecimal numbers into Binary: 1A

26 On your whiteboards Convert the following Hexadecimal numbers into Binary: B2

27 On your whiteboards Convert the following Hexadecimal numbers into Binary: CA


Download ppt "The Hexadecimal Number System Representation of Data in Computer Systems."

Similar presentations


Ads by Google