Math, asked by haroon7922, 9 months ago

Write an algorithm.draw a corresponding flowchart and write an interactive program to convert a binary number to its decimal equivalent.​

Answers

Answered by monica789412
3

Alogorithm to convert binary number to its decimal equivalent is given below

Step-by-step explanation:

1.Flowchart:

  • binary number is converted to decimal with multiplication of 2^n from starting bits.
  • create an array to store binary bits, which has garbage values when declared.
  • Take input from the user.
  • Run a loop till the last element of the binary number.

Example

Binary to Decimal

II000II→99

II00.I01→12.625

2.binary conversion. [′bīn·ə·rē kən′vər·zhən] (computer science) Converting a number written in binary notation to a number system with another base, such as decimal, octal, or hexadecimal.

3.So, 224 is the decimal equivalent of the binary number 11100000.

4.Binary to decimal conversion table

Binary Number Decimal Number Hex Number

1001                      9                             9

1010                             10                   A

1011                              11                            B

1100                              12                    C

5.A Binary Number is made up of only 0s and 1s. 110100. Example of a Binary Number. There is no 2, 3, 4, 5, 6, 7, 8 or 9 in Binary! A "bit" is a single binary digit.

6.An easy method of converting decimal to binary number equivalents is to write down the decimal number and to continually divide-by-2 (two) to give a result and a remainder of either a “1” or a “0” until the final result equals zero. So for example.

To know more about this :

https://brainly.in/question/12405837

https://brainly.in/question/5758213

Similar questions