Skip to content

9618 · 1.1

Data Representation — FAQ

Frequently asked questions for 9618 Data Representation. Direct answers first, then deeper explanation — then practise with marking.

Why do we even need hexadecimal if computers only use binary?

For convenience and readability. A long binary string like 1101010011101011 is difficult for a programmer to read, type, or remember. The same value in hexadecimal is D4EB, which is much shorter and less prone to transcription errors. It acts as a useful shorthand.

What is the difference between an unsigned and a signed integer?

An unsigned integer uses all its bits to represent the magnitude of a positive number. An 8-bit unsigned integer can represent values from 0 to 255. A signed integer uses one of its bits (the MSB) to indicate the sign (positive or negative), so it can represent both positive and negative values, but over a different range. An 8-bit signed integer (using two's complement) represents values from -128 to +127.

How do I know if the binary number `10001101` is negative or just a large positive number?

You must know the context! If you are told it's an 8-bit unsigned integer, it represents 128 + 8 + 4 + 1 = 141. If you are told it's an 8-bit signed integer using two's complement, the leading '1' means it's negative. To find its value, you would perform the two's complement operation on it to find its positive magnitude.