write the rule for conversion of decimal number into binary ,octal and hexadecimal
Answers
Answer:
To convert from decimal to other number systems, we use a repeated process of division, and dividing remainders.
We begin by taking the largest power of our new base, and divide our original number by the new base. The quotient gives us our digit, and the process is repeated on the remainder. This process has to be repeated until we divide by the final 1 to get the last digit.
By way of example, we'll convert the number 35 from decimal to binary, octal, and hexadecimal.
In converting to binary, we need to know the powers of 2, which are 1, 2, 4, 8, 16, 32, 64, and so on, we'll start with 32, since 32 is smaller than our initial number of 35, and 64 is larger.
35 ÷ 32 = 1, remainder 3 -> The first digit is 1
3 ÷ 16 = 0, remainder 3 -> the second digit is 0
3 ÷ 8 = 0, remainder 3 -> the third digit is 0
3 ÷ 4 = 0, remainder 3 -> the third digit is 0
3 ÷ 2 = 1, remainder 1 -> the fourth digit is 1
1 ÷ 1 = 1, remainder 0, the fifth digit is 1
The answer is that 35 decimal = 100011 binary.
In converting to octal, we need to know the powers of 8, which are 1, 8, 64, 512, and so on. We'll start with 8, since 8 is smaller than our initial number of 35, and 64 is larger.
35 ÷ 8 = 4, remainder 3 -> The first digit is 4
3 ÷ 1 = 3, remainder 0 -> The second digit is 3.
The answer is that 35 decimal = 43 octal.
In converting to hexadecimal to decimal, we'll use the powers of 16: 1, 16, 256, and so on. We start with 16, since 16 is smaller than our inital number of 35, and 256 is larger.
35 ÷ 16 = 2, remainder 3 -> The first digit is 2.
3 ÷ 1 = 3, remainder 0 -> The second digit is 3.
The answer is that 35 decimal = 23 hexadecimal.
Explanation: