to convert decimal to binary, repeatedly divide the value by 2, taking the remainder until the value is 1 or 0.
1987 / 2 = 993 r 1
993 / 2 = 496 r 1
496 / 2 = 248 r 0
248 / 2 = 124 r 0
124 / 2 = 62 r 0
62 / 2 = 31 r 0
31 / 2 = 15 r 1
15 / 2 = 7 r 1
7 / 2 = 3 r 1
3 / 2 = 1 r 1
1 / 1 = 1
Thus: 1987 in binary is 11111000011.
Proof (binary back to decimal):
1 * 2^0 = 1
1 * 2^1 = 2
0 * 2^2 = 0
0 * 2^3 = 0
0 * 2^4 = 0
0 * 2^5 = 0
1 * 2^6 = 64
1 * 2^7 = 128
1 * 2^8 = 256
1 * 2^9 = 512
1 * 2^10 = 1024
1024 + 512 + 256 + 128 + 64 + 2 + 1 = 1987
To convert to octal, split the binary value into groups of 3 bits:
11 111 000 011
Pad the first group with zeroes to make 3 bits if necessary:
011 111 000 011
Convert each group to its equivalent octal digit according to the following table:
000 = 0
001 = 1
010 = 2
011 = 3
100 = 4
101 = 5
110 = 6
111 = 7
Therefore: 011 111 000 011 = 3 7 0 3
Thus: 1987 in octal is 3703.
Proof:
3 * 8^0 = 3
0 * 8^1 = 0
7 * 8^2 = 448
3 * 8^3 = 1536
1536 + 448 + 3 = 1987
Chat with our AI personalities