pctechguide.com

  • Home
  • Guides
  • Tutorials
  • Articles
  • Reviews
  • Glossary
  • Contact

Number Systems 3

The basic unit of computer storage is the eight bit byte, which can store values in the decimal range 0 to 255. The problem when dealing with numbers in binary format is that they quickly become very long. For instance, the number 317 is represented as: 0b100111101, which is bad enough, but the number 17341 is no less than 0b100001110111101!

This is clearly going to be a headache, but there is another number system that comes to our rescue: hexadecimal. Hexadecimal (or hex) is a base 16 number system, so now our number columns increase in powers of 16. Now lets take the number 17341 expressed as a hex number:

4096 256 16 units
4 3 B D

Here, where decimal uses 5 digits, and binary uses 15 digits (bits), hex uses only 4 digits: 0x43BD. (Notice that the number is preceded with 0x, identifying it as a hex number in the same way that preceding a number 0b denotes a binary number.) Of course what’s confusing here is the use of the B and the D – how can these be part of a number? Well, remember that this is a base 16 number system, and we usually only use numbers 0 to 9. So, the numbers 10 to 15 in decimal need to be represented in hex using characters from the alphabet, A through to F.

The following table shows the values 0 to 15 in decimal, binary, and hexadecimal.

Decimal Binary Hex
0 0000 0
1 0001 1
2 0010 2
3 0011 3
4 0100 4
5 0101 5
6 0110 6
7 0111 7
8 1000 8
9 1001 9
10 1010 A
11 1011 B
12 1100 C
13 1101 D
14 1110 E
15 1111 F

How Does Hexadecimal Help?

So, you may think that’s all very well, but how does using hexadecimal help us to work with binary numbers? Well, two things. First, take a look at the representation of 87 again:

128 64 32 16 8 4 2 units
0 1 0 1 0 1 1 1

Notice that the one hundred and twenty-eights column has been included despite it being of value 0. This is the way that the computer stores numbers in RAM, because every number stored will take at least one byte. Now, also look at the table above showing the hex count 0 to F, and compare the binary column. Notice that each hex number is represented by four binary digits? And there’s the key. We can split each byte into two groups of four bits, and equate them to hex values.

binary 128 64 32 16 8 4 2 units
0 1 0 1 0 1 1 1
hex 16 units
5 7

So, what we’re saying here is that 87 = 0b01010111 = 0x57. The key here is that the 8 bit binary number has been split into two groups of 4 bits, and equated to the hexadecimal numbers. So, the first four bits: 0b0101=0x5, and the second four bits: 0b0111=0x7. And that’s really it – very quickly and simply, we have converted the binary to hex.

It’s simple to check by converting to decimal: we have five sixteens, and seven units. So, 5×16=80, and 80+7=87. Correct!

And there you have it. Because the hex number system so readily provides a shorthand for the byte, requiring only two characters to represent the bytes possible values, it is widely adopted for all sorts of computer purposes.

The simple fact is, anyone approaching computer science in pretty much any discipline will need to get themselves familiar with counting in base 16. But the good news is, with only a bit of practice it quickly becomes second nature, and on the next page you can test yourself, and get in some practice, with an interactive conversion tool. Or, you can just use it to convert numbers for you

  • Number Systems 2
  • Number Systems 3
  • Number Systems 4

Filed Under: Number Systems

Latest Articles

CD-ROM CAV

CLV remained the dominant CD-ROM technology until Pioneer, the first with quad-speed when most only had single, skipped six- and eight-speed entirely in favour of the new ten-speed speed technology employed by its DR-U10X drive, launched in … [Read More...]

SCSI Internal Mounting

Identify an available 5.25in drive bay into which to mount the drive. If you must use mounting rails, screw the rails into the lower pair of holes on either side of the drive. Make sure the metal portion is angled away from the device and facing forward. Check their positioning by sliding … [Read More...]

Disk Defrag

Video Covering Disk Defrag - Part of our Fix Slow Computer tutorial found on  https://www.pctechguide.com/how-to-fix-your-slow-computer Transcription from Video: Hi, this is Jacob with pctechguide.com, and this is Part 5 of our Why is my Computer Slow series. And in each one of these series … [Read More...]

Gaming Laptop Security Guide: Protecting Your High-End Hardware Investment in 2025

Since Jacob took over PC Tech Guide, we’ve looked at how tech intersects with personal well-being and digital safety. Gaming laptops are now … [Read More...]

20 Cool Creative Commons Photographs About the Future of AI

AI technology is starting to have a huge impact on our lives. The market value for AI is estimated to have been worth $279.22 billion in 2024 and it … [Read More...]

13 Impressive Stats on the Future of AI

AI technology is starting to become much more important in our everyday lives. Many businesses are using it as well. While he has created a lot of … [Read More...]

Graphic Designers on Reddit Share their Views of AI

There are clearly a lot of positive things about AI. However, it is not a good thing for everyone. One of the things that many people are worried … [Read More...]

Redditors Talk About the Impact of AI on Freelance Writers

AI technology has had a huge impact on our lives. A 2023 survey by Pew Research found that 56% of people use AI at least once a day or once a week. … [Read More...]

11 Most Popular Books on Perl Programming

Perl is not the most popular programming language. It has only one million users, compared to 12 million that use Python. However, it has a lot of … [Read More...]

Guides

  • Computer Communications
  • Mobile Computing
  • PC Components
  • PC Data Storage
  • PC Input-Output
  • PC Multimedia
  • Processors (CPUs)

Recent Posts

Celeron Coppermine

In the spring of 2000 the packaging picture became even more complicated with the announcement of the first Celeron … [Read More...]

2004 Site Updates

Date Details of Updates 21Nov '04 Tutorials: New tutorials added: - How to maintain your hard disk drive - How to schedule a program … [Read More...]

Hard Disk Longitudinal Recording

For nearly 50 years, the disk drive industry has focused nearly exclusively on a method called longitudinal magnetic recording, in which the … [Read More...]

[footer_backtotop]

Copyright © 2025 About | Privacy | Contact Information | Wrtie For Us | Disclaimer | Copyright License | Authors