Skip to content
thecscience
THECSICENCE

Learn everything about computer science

  • Home
  • Human values
  • NCERT Solutions
  • HackerRank solutions
    • HackerRank Algorithms problems solutions
    • HackerRank C solutions
    • HackerRank C++ solutions
    • HackerRank Java problems solutions
    • HackerRank Python problems solutions
thecscience
THECSICENCE

Learn everything about computer science

Number System – Overview

YASH PAL, April 2, 2022December 30, 2024

Number system – In a digital computer everything, whether it is some data, result, or 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.

Number System
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).

Types of Number Systems in Computer

  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

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 numbers with equivalent Binary Numbers

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

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. below given table shows the counting in octal numbers with its equivalent in decimal and binary systems.

Decimal numbers with equivalent Binary and Octal Numbers

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

Hexadecimal number system

The hexadecimal number system is very popular in computer uses. 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 alphabets A to F.

Since numeric digits and alphabets both are used to reprint the digits in the hexadecimal number system. this is an alphanumeric number system. below given table shows the hexadecimal numbers with their binary and decimal equivalents.

Number system Arithmetic – Addition & Subtraction

HexaDecimal numbers with equivalent Binary and Decimal Numbers

HexadecimalDecimalBinary   
000000
110001
220010
330011
440100
550101
660110
770111
881000
991001
A101010
B111011
C121100
D131101
E141110
F151111

Binary coded decimal (BCD) number

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 used commonly in data communication. it is a seven-bit code, and its 128 (2^7) 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.

  • HackerRank Dynamic Array Problem Solution
  • HackerRank 2D Array – DS Problem Solution
  • Hackerrank Array – DS Problem Solution
  • Von Neumann and Harvard Machine Architecture
  • Development of Computers
©2025 THECSICENCE | WordPress Theme by SuperbThemes