Computer Science – 1.1 Data Representation | e-Consult
1.1 Data Representation (1 questions)
Binary magnitudes represent the power of 2 associated with each position in a binary number. Unlike decimal magnitudes which are powers of 10 (1, 10, 100, 1000, etc.), binary magnitudes are powers of 2 (1, 2, 4, 8, 16, etc.). Each position in a binary number corresponds to a power of 2, starting from the rightmost digit as 20, then 21, 22, and so on.
For example, consider the binary number 10112. The magnitudes are:
- Rightmost digit (1): 20 = 1
- Second digit from right (1): 21 = 2
- Third digit from right (0): 22 = 4
- Leftmost digit (1): 23 = 8
The decimal equivalent of 10112 is (1 * 8) + (0 * 4) + (1 * 2) + (1 * 1) = 8 + 0 + 2 + 1 = 11.
The difference is crucial because in decimal, each position represents a multiple of 10. In binary, each position represents a multiple of 2. This means that a value in binary that requires a relatively small number of digits in decimal will require significantly more digits in binary. This is because the powers of 2 grow much faster than the powers of 10.
Consider the number 100 (decimal). This is represented as 1100100 (binary). This requires 7 digits. The same number, 100 (decimal), is represented as 100 (binary), which only requires 3 digits. This illustrates the difference in magnitude representation.