0100 represents which decimal value when interpreted as a 4-bit binary number?

Enhance your programming skills with the RECF Programming Test. Features flashcards and multiple choice questions with hints and explanations. Prepare for success!

Multiple Choice

0100 represents which decimal value when interpreted as a 4-bit binary number?

Explanation:
Converting a 4-bit binary number to decimal relies on the weights of each bit: from left to right the values are 8, 4, 2, and 1. The number 0100 has a 1 in the second position, which corresponds to 4, and 0s in the other positions, so the total is 4. The other options would come from different bit patterns: 0010 is 2, 0110 is 6, and 1000 is 8.

Converting a 4-bit binary number to decimal relies on the weights of each bit: from left to right the values are 8, 4, 2, and 1. The number 0100 has a 1 in the second position, which corresponds to 4, and 0s in the other positions, so the total is 4. The other options would come from different bit patterns: 0010 is 2, 0110 is 6, and 1000 is 8.

Subscribe

Get the latest from Passetra

You can unsubscribe at any time. Read our privacy policy