The Hexadecimal Number System Representation of Data in Computer Systems
Activity 1 2 minutes to convert the following hex numbers into denary: 1A B2 CA
Representing Numbers in Hexadecimal
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 (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.
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 = 257
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
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 A B C D E F
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 Ten 16s Fifteen 1s
On your whiteboards Convert the following hex number into denary: E2
On your whiteboards Convert the following hex number into denary: CE
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
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
On your whiteboards Convert the following number into Hexadecimal: 174
On your whiteboards Convert the following number into Hexadecimal: 162
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 in binary ( 9 digits ) is 102 in hexadecimal ( 3 digits ) But it is still just 258 in Denary ( also 3 digits )
Representation of Data in Computer Systems The ease of converting between hex and binary… 161 Hexadecimal Place Values 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.
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? C = = 12 C = 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
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: 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
Representation of Data in Computer Systems Convert this binary number into Hex… 161 Hexadecimal Place Values Binary: 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
Representation of Data in Computer Systems Convert this binary number into Hex… 161 Hexadecimal Place Values Binary: 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
On your whiteboards Convert the following binary numbers into Hexadecimal:
On your whiteboards Convert the following binary numbers into Hexadecimal:
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 (0) Hex: 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.
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 Hex: 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.
On your whiteboards Convert the following Hexadecimal numbers into Binary: 1A
On your whiteboards Convert the following Hexadecimal numbers into Binary: B2
On your whiteboards Convert the following Hexadecimal numbers into Binary: CA