Here we will see how you can convert a number to binary format, and we will also see how to convert binary to decimal numbers.
How to convert a number into Binary?
In the further steps we will convert 22 into binary format, and you can convert any number into binary by following the steps given below.
- Divide the number by 2
- Take the integer quotient for the next iteration
- Take the remainder for the binary digit
- Repeat the steps until the quotient is equal to 0
- Arrange all the remainders from bottom to top
The binary format of
Conversion from binary to decimal
10110 is the binary of
22. Now we will see how we can get back the number from the binary format.
|Power of 2 (from the right or bottom)||24||23||22||21||20|
|Power value (Ignore the zeros)||16||4||2|
Sum of 16+4+2 = 22