Binary Number System
The Number system used in computers which only uses 0 and 1.
Binary Digit | Equivalent Decimal Values |
---|---|
0 | 0 |
1 | 1 |
Binary Number uses as base value instead of like we use in decimal number.
Decimal to Binary Conversion
A software engineer is writing a program that will convert decimal numbers to binary. The engineer needs to test the program with a few different numbers. What are the binary equivalents of the decimal numbers 45?
Q1 = 22 & R1 = 1
Q2 = 11 & R2 = 0
Q3 = 5 & R3 = 1
Q4 = 2 & R4 = 1
Q5 = 1 & R5 = 0
Q6 = 0 & R6 = 1
Q7 = 0 & R7 = 0
Binary to Decimal Conversion
Your grandfather gifted you a chocolate bar & your mother gave you a challenge to figure out, how much it costs ? Otherwise you can't play with that car. Your mother gave you this hint: Price amount is in binary. How much rupees did it cost?
As we know the value of the car is in binary, we have to convert it in decimal.
Now surprise your mother by shouting 14 Rupees. Then, snatch the chocolate bar & eat it!