320 likes | 952 Views
Hexadecimal Numbering System. Optional for DTC 12. Binary revisited. We have learned that any decimal number can be shown in a binary format – 1’s and 0’s. 8 10 = 1000 2 10 10 = 1010 2
E N D
Hexadecimal Numbering System Optional for DTC 12
Binary revisited • We have learned that any decimal number can be shown in a binary format – 1’s and 0’s. • 810 = 10002 • 1010 = 10102 • Binary suits the computer because it is a 2 state device. Electrical signals – on or off, 1 for on, 0 for off.
Binary • These two states, on or off, called be called anything, - but in computer science, they are called bits. And 0 or 1 are the names for the states. • It can get really cumbersome trying to represent everything in just a bit, the string of 1’s and 0’s gets really large. So we group the bits together as a byte (8 bits)
Binary – problems • It gets cumbersome. Sometimes it is necessary to use binary data when working with computers, but it is difficult for humans to work with the large number of digits in binary. The numbers of 1’s and 0’s gets big!! And confusing. So we work in the Base-16.
What is Hexadecimal? • Base - 16 (that is, it employs sixteen different symbols for digits), usually written using the symbols 0–9 to represent digits zero to nine, plus A, B, C, D, E, F (or alternatively a, b, c, d, e, f) to represent digits with values ten to fifteen. • The first natural numbers written in hex this way are: 1, 2, 3, 4, 5, 6, 7, 8, 9, A, B, C, D, E, F, 10, 11, 12, etc. Note that in hex, 10 represents sixteen, its base number.
Using Hexadecimal • Convert 1510 to binary • 11112= 810 + 410 + 210 + 110 • Given that hexadecimal (Base-16) has characters 1-9, then A-F … what is the Hexadecimal representation of the 1510? • F16
What are the Hex representations of the following decimal numbers? • 1710 • 810 • 2310 • 5510 This is an option question here. Give it a go to check out yr understanding.
What are the following Hex representations of the following binary numbers? • 10002 • 11002 • 100012 • 1100012 By the way … there on line converters from decimal to binary to hex. Have a look at them and check your answers.