To convert a decimal number into binary, we divide the number by 2 and record the remainders until we get a quotient of 0. The binary equivalent is the sequence of remainders read from bottom to top.
1. Decimal number 21 to binary:
- \( 21 \div 2 = 10 \) remainder \( 1 \)
- \( 10 \div 2 = 5 \) remainder \( 0 \)
- \( 5 \div 2 = 2 \) remainder \( 1 \)
- \( 2 \div 2 = 1 \) remainder \( 0 \)
- \( 1 \div 2 = 0 \) remainder \( 1 \)
Reading the remainders from bottom to top, we get the binary equivalent of 21 as:
\[
\text{21 (decimal)} = 10101 (binary)
\]
2. Decimal number 43 to binary:
- \( 43 \div 2 = 21 \) remainder \( 1 \)
- \( 21 \div 2 = 10 \) remainder \( 1 \)
- \( 10 \div 2 = 5 \) remainder \( 0 \)
- \( 5 \div 2 = 2 \) remainder \( 1 \)
- \( 2 \div 2 = 1 \) remainder \( 0 \)
- \( 1 \div 2 = 0 \) remainder \( 1 \)
Reading the remainders from bottom to top, we get the binary equivalent of 43 as:
\[
\text{43 (decimal)} = 101011 (binary)
\]
Thus, the binary equivalents are:
- 21 (decimal) = 10101 (binary)
- 43 (decimal) = 101011 (binary)