NTA UGC NET 2023 » NTA Study Materials » Computer Science » Octal and Hexadecimal Number Systems

Octal and Hexadecimal Number Systems

The octal and hexadecimal number systems have been introduced to interpret large binary numbers in computer languages. The octal number system is a base-8 number system, whereas the hexadecimal number system is a base-16 number system.

Computers are a man made creation, but they work on the language of numbers. When we type a letter, number or special character on a computer, the operating system converts the input into numbers. This is because a computer can only understand the positional number system in which there are some symbols that are called digits. The symbols used in the number system depict varying values.

The magnitude of every digit in a number is determined by using a digit, the place of the digit in the number and the base of a system of numbers. There are several types of number systems, such as the decimal number system, binary number system, etc.

In this article, we will discuss the octal and the hexadecimal number system. We will first talk about what is octal number system and its representation. Then we will move on to discuss the hexadecimal number system and its representation.

Octal Number System

The octal number system, also known as oct, is a base-8 number system. The system uses digits from 0 to 7. Therefore, if we write 10 octal, it depicts 8, and if we write 100 octals, it represents 64. When we study the decimal number system, each place is represented using the power of 10. But when we implement the octal number system, each place is the power of 8.

Converting octal numbers is quite easy. For converting an octal number, all we need to do is group the binary digits in a group of three. An example of octal number system is the representation of decimal 74. The decimal representation of 74 is 1001010. In this system, two zeroes can be placed before the binary digit 1, and now we convert 74 into octal. The octal number is 112.

The primary characteristic of an octal number system is that it has 8 different counting digits from 0 to 7. In the early computing days, octal numbers and the octal numbering system counted inputs and outputs. The octal number was introduced to convert large binary numbers conveniently. However, the octal number system is gradually becoming extinct because of the more popular hexadecimal number system.

Representation of Octal Number

The system doesn’t use any number or alphabet above 8. Moreover, the conversion of octal numbers into binary numbers is similar to the hexadecimal numbers. Octal numbers are represented in the following manner.

Decimal number

3-bit binary number

Octal number

0

000

0

1

001

1

2

010

2

3

011

3

4

100

4

5

101

5

6

110

6

7

111

7

8

001 000

10 (1+0)

9

001 001

11 (1+1)

When writing 10 or 20, don’t get confused because the number 10 and number 20 is the representation using (1+0) and (2+0) in the octal number system. The octal number is 8octal. The value of octal varies from 0-to 7.

Hexadecimal Number System

A hexadecimal number system is a number system in which the base value is 16. This means that there are 16 symbols used in the hexadecimal system. The hexadecimal symbols are 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, A, B, C, D, E, and F. The alphabets used in the hexadecimal system are the single bit depiction of the decimal numbers 10, 11, 12, 13, 14, and 15. The hexadecimal system requires 4 bits to depict any digit. Since there are so many number systems, the hexadecimal number system is generally denoted using the letter h.

In the hexadecimal system of numbers, each digit has a weightage equivalent to the power of 16. Thus in a hexadecimal system of numbers, each digit is 16 times more valuable than the previous digit. The numerical value of each digit in the hexadecimal sequence is obtained by multiplying the number with the power of 16, which depends on the position of the number and then adding the number to the sum.

Software developers use the hexadecimal number system extensively because it conveniently represents the binary-coded values.

Representation of Hexadecimal Numbers

From the above definition, it is clear that the hexadecimal number system is a collection of 4 bits. Each collection of bits in the hexadecimal numbers 0 and 15. Hexadecimal numbers are extensively used in modern computers and digital systems because they are convenient to interpret.

The representation of hexadecimal numbers is as follows:

Hex

0

1

2

3

4

5

6

7

8

Binary   

0000

0001

0010

0011

0100

0101

0110

0111

1000

Hex

9

10 = A

11 = B

12 = C

13 = D

14 = E

15 = F

Binary

1001

1010

1011

1100

1101

1110

1111

The main reason the hexadecimal number system was invented was to tackle the problem of converting large binary numbers. Using this number system, we can easily pair the binary digits into a group of 4 and write them in the hexadecimal format.

Conclusion

Studying the different number systems, such as decimal number system, hexadecimal

number system and octal number system, is essential to understanding the working of computers and other electronic devices. In this article, we have gained knowledge about the octal number system, hexadecimal number system and the different ways of representing them.

After reading this article, you gain the following learnings:

  • Difference between the decimal, hexadecimal and octal system is that the base in every system is different

  • Hexadecimal system has a base of 16, octal system has a base of 8 and decimal system has a base of 10

  • In hexadecimal 4 binary digits are paired together

  • In the octal system, 3 binary digits are paired together

Important Links:

faq

Frequently asked questions

Get answers to the most common queries related to the NTA Examination Preparation.

What is the octal number system?

Ans. An octal number system is a number system used to represent large binary numbers by grouping them in a pair of ...Read full

What is the base of the octal and hexadecimal number system?

Ans. The base of octal and hexadecimal number systems are as follows: ...Read full

Why are octal and hexadecimal number systems used?

Ans. The octal and hexadecimal number systems are introduced to interpret large binary numbers in computer languages...Read full

What are decimal and hexadecimal number systems?

Ans. Decimal and hexadecimal are number systems, which have a base of 10 and 16, respectively.