Write 38 in the base-two system.

Check the final answer first, then review the worked steps.

Answer

100110

Work

38 / 2 = 19 R 0
19 / 2 = 9 R 1
9 / 2 = 4 R 1
4 / 2 = 2 R 0
2 / 2 = 1 R 0
1 / 2 = 0 R 1
Result: 100110

Step-by-step solution

  1. Divide 38 by 2 repeatedly and track the remainders: $38 \div 2 = 19$ remainder $0$.
  2. $19 \div 2 = 9$ remainder $1$.
  3. $9 \div 2 = 4$ remainder $1$.
  4. $4 \div 2 = 2$ remainder $0$.
  5. $2 \div 2 = 1$ remainder $0$.
  6. $1 \div 2 = 0$ remainder $1$.
  7. Read the remainders from bottom to top to get the binary representation: $100110$.