Skip to content
The Computer Science
TheCScience
  • Engineering Subjects
    • Human Values
    • Computer System Architecture
    • Digital Communication
    • Internet of Things
  • NCERT Solutions
    • Class 12
    • Class 11
  • HackerRank solutions
    • HackerRank Algorithms Problems Solutions
    • HackerRank C solutions
    • HackerRank C++ problems solutions
    • HackerRank Java problems solutions
    • HackerRank Python problems solutions
The Computer Science
TheCScience

Number System in Computer

YASH PAL, April 2, 2022March 10, 2026

Number System in Computer – In a digital computer, everything, whether it is some data, a result, or an instruction, has to be represented using only 0s and 1s. This is because the digital computer basically uses transistors that are made to work in the ‘OFF’ state or in the ‘ON’ state. The ‘OFF’ state is generally represented as the logic ‘0’, and the ‘ON’ state is represented as the logic ‘1’. This is called a binary number system.

However, the decimal number system, which includes 0, 1, 2, 3, 4, 5, 6, 7, 8, and 9, is convenient for the programmer and user. The radix or base of this number system is 10. The programmer feeds instructions and data in the alphabet and decimal digits. But for the operation of the computer, these are converted to binary numbers (0s and 1s).

Here are the 5 types of Number systems that a computer uses:

  1. Binary
  2. Octal
  3. Hexadecimal
  4. Binary coded decimal number
  5. ASCII (American standard code for information interchange)

There are some other systems also used to represent numbers. Some of these are octal and hexadecimal number systems. Digital systems like microprocessors, logic circuits, computers, etc., are usually designed to process hexadecimal or octal numbers.

Binary number system

The number system with base (or radix) two is known as the binary number system. The digits (0 and 1) are used to represent the numbers in this system. These are known as bits. It is a positional system, i.e., every position is assigned a specific weight.

Decimal Number Binary Number   
D1D0B3B2B1B0
000000
010001
020010
030011
040100
050101
060110
070111
081000
091001
101010
111011
121100
131101
141110
151111
Decimal numbers with equivalent Binary Numbers

The above-given table shows the counting in the binary number system, with their equivalent decimal value. In the binary number system, a group of four bits is known as a nibble, and a group of eight bits is known as a byte.

Octal number system

The number system with base (or radix) eight is known as the octal number system. In this system, eight digits (0, 1, 2, 3, 4, 5, 6, and 7) are used to represent the numbers. Similar to decimal and binary number systems, it is also a positional system. The table shows the counting in octal numbers with their equivalent in decimal and binary systems.

Decimal NumberBinary NumberOctal Number
D1 D0B3 B2 B1 B0O1 O0
0 00 0 0 00 0
0 10 0 0 10 1
0 20 0 1 00 2
0 30 0 1 10 3
0 40 1 0 00 4
0 50 1 0 10 5
0 60 1 1 00 6
0 70 1 1 10 7
0 81 0 0 01 0
0 91 0 0 11 1
1 01 0 1 01 2
1 11 0 1 11 3
1 21 1 0 01 4
1 31 1 0 11 5
1 41 1 1 01 6
1 51 1 1 11 7
Decimal numbers with equivalent Binary and Octal Numbers

Hexadecimal number system

The hexadecimal number system is very popular among computer users. The base for hexadecimal numbers is 16. In this number system, 16 distinct symbols are required to represent the number. These are numerals 0 to 9 and letters A to F. Since numeric digits and letters are used to represent the digits in the hexadecimal number system, this is an alphanumeric number system. The table below shows the hexadecimal numbers with their binary and decimal equivalents.

HexadecimalDecimalBinary   
000000
110001
220010
330011
440100
550101
660110
770111
881000
991001
A101010
B111011
C121100
D131101
E141110
F151111
Hexadecimal numbers with equivalent Binary and Decimal Numbers

Binary coded decimal (BCD) numbers

In most microprocessor-based systems, data are entered and displayed in decimal numbers. However, the data processing inside the microprocessor is performed in binary. The data are entered through a decimal keyboard, and the monitor program of the system converts each key into an equivalent 4-bit binary number. This is known as a binary-coded decimal (BCD) number. After conversion, two BCD numbers are stored in an 8-bit register or a memory location. These numbers are called packed BCD.

ASCII code

The American Standard Code for Information Interchange (ASCII) is commonly used in data communication. It is a seven-bit code, and its 128 (27) combinations are assigned different alphanumeric characters.

For example, the hex numbers 30H to 39H represent 0 to 9 ASCII decimal numbers, and 41H to 5AH represent capital letters A through Z. In this code, bit D7 is zero. When an ASCII character is entered through an ASCII keyboard, the microprocessor receives the binary equivalent of an ASCII hex number.

computer fundamentals engineering subjects Microprocessor engineering subjectsmicroprocessor

Post navigation

Previous post
Next post

Leave a Reply

You must be logged in to post a comment.

TheCScience

We at TheCScience.com are working towards the goal to give free education to every person by publishing in dept article about Secondary, Senior-Secondary, and Graduation level subjects.

Pages

About US

Contact US

Privacy Policy

DMCA

Our Tools

Hosting - get 20% off

Engineering Subjects

Internet of Things

Human Values

Digital Communication

Computer System Architecture

Programming Tutorials

Data Structure and Algorithm

C

Java

NCERT

Class 12th

©2026 TheCScience | WordPress Theme by SuperbThemes