Typical tasks:
Examples:
Convert (12.50)10 to binary (answer: 1100.1
)
(12.50)10
Convert −65 to signed 8-bit (answer: 10111111
)
−65
Convert 11011010
to hex (answer: 0xDA
)
Convert the signed char 11011010
to decimal (answer: −38)
−38
Convert the unsigned char 11011010
to decimal (answer: 218)
218
What is the range of signed/unsigned integers with n bits?
n
What is the hex encoding of MAX_INT
, MIN_INT
, 1
, 0
, 1
, MAX_UINT
, MIN_UINT
?
What is the size and range of the C types char
, short
, int
, long
?
What are the conditions to detect signed overflow?
What are the conditions to detect unsigned overflow?
Typical tasks: