Binary numbers can be unwieldy in length

Place holders are powers of 16

Power of 16: | 3 | 2 | 1 | 0 |
---|---|---|---|---|

Weight: | 4096 | 256 | 16 | 1 |

Sixteen symbols or characters needed:

The usual 10 of 0, 1, 2, ... 9 plus A, B, C, D, E, and F

Correspondence between new hexadecimal digits and decimal/binary

Decimal | Hex | Binary |
---|---|---|

10 | A | 1010 |

11 | B | 1011 |

12 | C | 1100 |

13 | D | 1101 |

14 | E | 1110 |

15 | F | 1111 |

4 **bits** used to represent a single hex digit

*Example*: conversion of 7CE to decimal.

7CE = | (7 x 16^{2}) + (C x 16) + E |

= | (7 x 256) + (12 x 16) + 14 |

= | 1792 + 192 + 14 |

= | 1998 |

If there is any likelihood of confusion, the base of the number system should be indicated by explicitly writing the radix.
For example, the answer above, decimal 1998, would be more precisely written as 1998_{10}.
Hexadecimal numbers are typically indicated by using the subscript H behind the number;
in the example above 7CE_{H} was converted to a decimal number.
Note that 1998 would be ambiguous if written in a context where the counting base is not clear;
is 1998_{H} or 1998_{10} intended?

*Example*: conversion of 7CE to binary.

7CE = | 0111 1100 1110 |

Back to SCEN103 Home Page.

Comments, suggestions, or requests to ghw@udel.edu.

"http://www.physics.udel.edu/~watson/scen103/hex.html"

Last updated March 18, 1999.

Copyright George Watson, Univ. of Delaware, 1999.