To convert a decimal number to binary, you simply need to divide by 2 and take note of the remainder.
Example:
23 / 2 = 11 Remainder 1
11 / 2 = 5 Remainder 1
5 / 2 = 2 Remainder 1
2 / 2 = 1 Remainder 0
2 / 1 = 0 Remainder 1
The answer is therefore 10111.
NB: If the question is to answer is 8-bit you must pad it out with zeroes as follows:
00010111
Chat with our AI personalities
Go on divide with 2 and retain reminders
2)23(11(5(2(1
1 1 1 0
Write in revers
10111
To cross check
1*2^4+0*2^3+1*2^2+1*2^1+1*2^0=16+4+2+1=23