What is the 4-bit binary representation of decimal 15?

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

Multiple Choice

What is the 4-bit binary representation of decimal 15?

Explanation:
To represent a decimal number in binary, think in powers of two. For a 4-bit representation you have four positions corresponding to 8, 4, 2, and 1. The decimal 15 equals 8 + 4 + 2 + 1, so every one of these bit positions is a 1. Put together, that becomes 1111. The other patterns either correspond to different values (1010 is 10, 1110 is 14) or have more than four digits (11001), which isn’t allowed in a 4-bit form. So the 4-bit binary representation of 15 is 1111.

To represent a decimal number in binary, think in powers of two. For a 4-bit representation you have four positions corresponding to 8, 4, 2, and 1. The decimal 15 equals 8 + 4 + 2 + 1, so every one of these bit positions is a 1. Put together, that becomes 1111. The other patterns either correspond to different values (1010 is 10, 1110 is 14) or have more than four digits (11001), which isn’t allowed in a 4-bit form. So the 4-bit binary representation of 15 is 1111.

Subscribe

Get the latest from Passetra

You can unsubscribe at any time. Read our privacy policy