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

VA – Vertically Aligned LCD Monitors

In late 1996, Fujitsu unveiled a TFT-LCD panel that used a new type of liquid crystal (LC) material that is naturally horizontal and has the same effect as IPS, but without the need for the extra transistors. Fujitsu used this material (which was developed by Merck of Germany) for … [Read More...]

V90 Technology

The V.90 standard is neither x2 nor K56Flex, although it does use techniques from both. It is actually two standards in one, the specification defining a digital modem and analogue modem pair capable of transmitting data at up to 56 Kbit/s … [Read More...]

Where to Learn More about Web Design and Website Development

If you're looking for a book on web page building, look for one that matches the tools and technologies that you're going to be using. Tools include: HTML editors (eg FrontPage or Dreamweaver) Graphics editing software Database software Technologies include things … [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...]

10 Exceptional Books on ChatGPT that Will Blow Your Mind

ChatGPT is a powerful new AI tool that is taking the world by storm. You are going to find a lot of amazing books that will teach you how to make the … [Read More...]

Guides

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

Recent Posts

Trackballs

A trackball is a pointing device consisting of a ball housed in a socket containing sensors to detect rotation of the … [Read More...]

What is Level 1 (L1) Cache Memory?

The Level 1 cache, or primary cache, is on the CPU and is used for temporary storage of instructions and data organised in blocks of 32 bytes. … [Read More...]

How to Incorporate QR Codes into Your Print Advertising

In the digital age, integrating technology with traditional marketing methods can significantly enhance the effectiveness of your campaigns. One such … [Read More...]

[footer_backtotop]

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