TestingDocs.com
Software Testing website
  • Automation
    • Selenium
    • JBehave Framework
  • Tutorials
    • MySQL Tutorials
    • Testlink
    • Maven
    • Git
  • IDEs
    • IntelliJ IDEA
    • Eclipse
  • Flowcharts
    • Flowgorithm
    • Raptor
  • About

Computers

Binary to Decimal number Conversion

Overview

In this tutorial, we will learn to convert a binary to a decimal number. The binary number is base 2 and the decimal number is base 10.

Binary to Decimal Conversion

We can convert a binary number to a decimal number by multiplying the digits with 2 and by increasing the power of the 2 by 1 as we move from the least significant binary digit to the upper binary digits. The least significant binary digit is multiplied by 2^0. We add all the results to get the decimal equivalent of the binary number.

Example

Let’s understand the concept with an example. We will convert the following binary number to the decimal equivalent number.

100101

Write down the binary number:

1    0     0   1   0   1

Write down the multiplication factors from right to left starting from the least significant binary digit.

 

1                   0                  0                      1                         0                     1

2^5             2^4            2^3                   2^2                  2^1                  2^0

Multiply with the respective binary digits:

1                             0                           0                      1                              0                          1

2^5=32             2^4=16            2^3=8                   2^2=4                  2^1=2                  2^0=1

 

1                0              0                   1                0                   1

X               X              X                  X               X                  X

32             16            8                   4                 2                  1

 

Decimal Number Conversion

 

 

The decimal equivalent number of the binary =

1*32 + 0*16 + 0*8 + 1*4 + 0*2 + 1*1

= 32 + 0+ 0 + 4 + 0 + 1

= 32 + 4 + 1

= 32 + 5

= 37

Related Posts

Characteristics of Computers

Computers /

Characteristics of Computers

Generations of Computers

Computers /

Computer Generations

Block Diagram of Computer

Computers /

Block Diagram of a Digital Computer

Classification of Computers

Computers /

Classification of Computers

Division Method Decimal to Binary

Computers /

Decimal to Binary using Division Method

‹ Decimal to Binary using Division Method› Classification of Computers

Recent Posts

  • Update draw.io on Windows
  • Install RAPTOR Avalonia on CentOS
  • Download RAPTOR Avalonia Edition on Windows
  • npm doctor command
  • Build & Run CLion Project
  • Create New CLion C Project on Windows
  • Configure CLion Toolchains on Windows
  • Launch CLion IDE on Windows
  • Activate CLion IDE
  • CLion IDE for C/C++ Development

Back to Top

Links

  • Contact
  • Privacy Policy
  • Cookie Policy

www.TestingDocs.com