The Wayback Machine - https://web.archive.org/web/20240621194059/https://www.geeksforgeeks.org/decimal-vs-binary/
Open In App

Difference Between Decimal and Binary Number System

Last Updated : 24 Apr, 2024
Improve
Improve
Like Article
Like
Save
Share
Report

Decimal Number is defined by the number which has a whole number and the fractional part separated by a decimal point. While Binary Number is defined by a number which is expressed as in the base-2 numeral system. It is always written in the form of 0 and 1. In math, a system that is used to represent numbers in different forms is called number system.

difference-between-decimal-and-binary-number-system

Decimal and Binary Number System

A mathematical value that is used to count, measure, and perform various arithmetic calculations is called a number. Based on properties, numbers are classified into different types, such as natural numbers, whole numbers, fractions, rational and irrational numbers, and so on.

In a similar way, we have different kinds of number systems based on different properties, such as a binary number system, an octal number system, a decimal number system, and a hexadecimal number system. We can convert a number from any number system into any of the other three number systems.

We have curated the difference between Decimal and Binary Number in detail below.

Difference between Decimal and Binary Number

Below is the difference between Decimal and Binary number system.

Number System Decimal Number System

Binary Number System

Definition

The number which has a whole number and the fractional part separated by a decimal point is called Decimal Number system.

A number system that expresses a number in terms of 0 and 1 digits is a binary number system. 

Base 10

2

Digits Used 0, 1, 2, 3, 4, 5, 6, 7, 8, 9

0, 1

Usage Everyday life and general arithmetic

Computers and digital systems

Number Representation More compact for the same values due to base 10

Longer for large values due to base 2

Calculation Method Standard arithmetic operations (taught in general education)

Binary arithmetic operations (simpler but different from decimal)

Decimal Number System

The number system that represents a number in terms of 0 to 9 digits is a decimal number system. A decimal number system has ten digits, i.e., 0, 1, 2, 3, 4, 5, 6, 7, 8, and 9. The base of a number in this system is 10. In the decimal number system, a number is expressed in terms of powers of 10, i.e., the positions of successive digits to the left of the decimal point represent units, tens, hundreds, thousands, and so on.

Some examples of numbers in the decimal number system are (23)10,(123)10, (5547)10, (6531)10, and so on. In everyday life, we most frequently represent numbers using the decimal number system.

For example, (123)10 in powers of 10 is expressed as 1 × 102 + 2 × 101 + 3 × 100. 1 is in the hundreds place, 2 is in the tens place and 3 is in the units place.

Binary Number System

A number system that expresses a number in terms of 0 and 1 digits is a binary number system. A binary system has only two digits, i.e., 0 and 1. The base of a number in this system is 2. In a binary number system, a number is expressed in terms of powers of 2.  For example, a decimal number 26 is expressed as (11010)2 in a binary system. The binary digits 0 and 1 are used in all computer coding and languages like C, C++, Java, etc., to write a program and encode any digital data.

A binary number (1011)2 is expressed in powers of 2 as (1 × 23) + (0 × 22) + (1 × 21) + (1 × 20).

 Decimal number 

 Binary number 

1

01

2

10

3

11

4

100

5

101

6

110

7

111

8

1000

9

1001

10

1010

Conversion of Binary and Decimal Number System

Binary numbers can be converted to Decimal numbers and Decimal numbers can be converted back to Binary numbers by using the following rules:

Decimal to Binary Conversion

To convert a decimal number into a binary number, divide the given number by 2 continuously till we get the quotient as 1. Note that we have to write the numbers from downwards to upwards.

Example: Convert (31)10 into a binary number.

Solution:

Therefore, (31)10 is expressed as (11111)2

Binary to Decimal Conversion

The number system that expresses a number in terms of 0 and 1 digits is a binary number system, whereas a decimal number system represents a number in terms of 0 to 9 digits. Now, to convert a binary number into a decimal number, multiply each digit of the binary number by the power of 2.

If B = an-1…a3a2a1a0 is a binary number that has n digits, then the respective decimal number will be

D = (an-1 × 2n-1) +…+(a3 × 23) + (a2 × 22) + (a1 × 21) + (a0 × 20).

Example: Convert (11001)2 to a decimal number.

Solution:

The given binary number is (11001)2.

(11001)2 = (1 × 24) + (1 × 23) + (0 × 22) + (0 × 21) + (1 × 20)

= 16 + 8 + 0 + 0 + 1 = (25)10

Therefore, the binary number (11001)2 is expressed as (25)10.

Solved Example on Conversion of Binary and Decimal Number

Example 1: Convert (65)10 into a binary number.

Solution:

Therefore, (65)10 is expressed as (1000001)2

Example 2: Convert (10101)2 to a Decimal number.

Solution:

The given binary number is (10101)2.

(10101)2 = (1 × 24) + (0 × 23) + (1 × 22) + (0 × 21) + (1 × 20)

= 16 + 0 + 4 + 0 + 1 = (21)10

Therefore, the binary number (10101)2 is expressed as (21)10.

Example 3: Convert (111001)2 to a Decimal number.

Solution:

The given binary number is (111001)2.

(10101)2 = (1 × 25) + (1 × 24) + (1 × 23) + (0 × 22) + (0 × 21) + (1 × 20)

= 32 + 16 + 8 + 0 + 0 + 1 = (57)10

Therefore, the binary number (111001)2 is expressed as (57)10.

Example 4: Convert (46)10 into a binary number.

Solution:

Therefore, (46)10 is expressed as (101110)2.

Difference Between Decimal and Binary Number System – FAQs

What are binary and decimal number systems?

The number system that expresses a number in terms of 0 and 1 digits is a binary number system, whereas a decimal number system represents a number in terms of 0 to 9 digits.

How can you convert a binary number into a decimal number?

To convert a binary number into a decimal number, multiply each digit of the binary number by the power of 2. If B = an-1…a3a2a1a0 is a binary number that has n digits, then the respective decimal number will be

D = (an-1 × 2n-1) +…+(a3 × 23) + (a2 × 22) + (a1 × 21) + (a0 × 20).

How can you convert a decimal number into a binary number?

To convert a decimal number into a binary number, divide the given number by 2 continuously till we get the quotient as 1. Note that we have to write the numbers from downwards to upwards.

What are the differences between binary and decimal number systems?

The number system that expresses a number in terms of 0 and 1 digits is a binary number system, whereas a decimal number system represents a number in terms of 0 to 9 digits. In a binary number system, a number is expressed in terms of powers of 2, whereas in a decimal number system a number is expressed in terms of powers of 10.

What is the equivalent decimal number to the binary number 11010?

11010 = (1 × 24) + (1 × 23) + (0 × 22) + (1 × 21) + (0 × 20)

= 16 + 8 + 0 + 2 + 0 = 26

So, (11010)2 is 26 in the decimal number system.



Similar Reads

What is the biggest 3 digit number in decimal system?
The method to represent and work with numbers is known as the number system. A number system is a system of writing to represent numbers. It is the mathematical notation used to represent numbers of a given set by using digits or other symbols. It allows us to operate arithmetic operations such as division, multiplication, addition, subtraction. So
5 min read
Difference Between Nervous System And Endocrine System
The human body has two primary systems that work together to regulate and coordinate body functions, the nervous system and the endocrine system. The nervous system is responsible for quick responses to stimuli, while the endocrine system controls slower, long-lasting changes in the body. In this article, we will discuss the differences between the
3 min read
Difference between Management Information System (MIS) and Decision Support System (DSS)
Decision Support System (DSS) is an interactive, flexible computer based information system or sub-system intended to help decision makers use communication technologies, data, documents to identify and solve problems, complete decision process tasks and make decision. Management Information System (MIS) consists of following three pillars: Managem
2 min read
Difference between Open-Loop Control System and Closed-Loop Control System
Control System is a system in which the behavior of the system is determined by a differential equation. It manages the devices and the systems using control loops. There are Open-Loop Control System and Closed-Loop Control System. Open-Loop Control System is used in applications in which no feedback and error handling are required. It is simple an
3 min read
Difference between Local File System (LFS) and Distributed File System (DFS)
1. Local File System (LFS) : The basic file system of Linux operating system is termed as Local file system. It stores any data file as it is in single copy. It stores data files in Tree format. Here, any user can access data files directly. LFS does not Replicate the data blocks. It always used for storing and processing personal data(small data).
3 min read
Difference between Batch Processing System and Online Processing System
Prerequisite - Types of Operating System 1. Batch Processing System : An Batch processing system handles large amounts of data which processed on a routine schedule. Processing occurs after the economic event occurs and is recorded. It requires fewer programming, hardware, and training resources. In this system programs are scheduled through jobs.
3 min read
Difference between System Software and Operating System
1. System Software: System software is a type of computer program that is designed to run a computer's hardware and application programs it controls a computer's internal functioning, chiefly through an operating system. It also controls peripherals devices such as monitors, printers, and storage devices. 2. Operating System: An operating system or
3 min read
Difference between Computer Information System and Management Information System
1. Computer Information System (CIS) :Computer Information System, as name suggests, is basically a system composed of people and computer that processes or interprets information and allows organization to communicate in more effective manner. These systems also encourage creative and effective innovation, and make collaboration easier than before
4 min read
Difference Between System.out.print() and System.out.println() Function in Java
In Java, we have the following functions to print anything in the console. System.out.print() andSystem.out.println() But there is a slight difference between both of them, i.e. System.out.println() prints the content and switch to the next line after execution of the statement whereas System.out.print() only prints the content without switching to
2 min read
Difference Between System.out.println() and System.err.println() in Java
System.out is a PrintStream to which we can write characters. It outputs the data we write to it on the Command Line Interface console/terminal. It is mostly used for console applications/programs to display the result to the user. It can be also useful in debugging small programs. Syntax: System.out.println("Your Text which you want to display");
2 min read