40 likes | 297 Views
Data Representation Hexadecimal Although computers work in binary it is sometimes inconvenient for humans to read everything in Binary. For example in main memory for a 32 bit computer you can have up to 32 bits of memory addresses e.g 01010111000011110101000101111101
E N D
Data Representation • Hexadecimal • Although computers work in binary it is sometimes inconvenient for humans to read everything in Binary. For example in main memory for a 32 bit computer you can have up to 32 bits of memory addresses e.g • 01010111000011110101000101111101 • To make it easier to read large numbers in binary, they are commonly put into group of four bits and displayed using the Hexadecimal number system. This is essentially base 16. Look at the following number conversion table
Data Representation Hexadecimal 16 would be 10000 in binary and 10 in hexadecimal.
Data Representation • Hexadecimal • So looking at that table we can see that the range of four bits is 0 to 15 – which is 16 digits. Hexadecimal covers that range by using letters for the remain 5 digits. So to convert our 32 bit number into hexadecimal we just split them up into 4 bits and assign a base 16 digit to each. • 0101 0111 0000 1111 0101 0001 0111 1101 • 5 7 0 F 5 1 7 D • So 01010111000011110101000101111101 is 570F517D in Hex. • To convert back into denary you just work back to binary and then to decimal as shown: = 163
Data Representation • Exercise • Convert the denary number 126 into • Binary • Hexadecimal • Convert the binary number 0110 1101 into • Denary • Hexadecimal • Convert the following binary patterns into hexadecimal numbers: 1111 1110 1110 1101 1101 1010 1101. What is the message? • SHOW ALL YOUR WORKINGS.