Data Representation Flashcards
(44 cards)
How many inputs and outputs do NOT gates have?
One Input
One Output
Put these units in order of size (smallest to largest):
Terabyte, Byte, Kilobyte, Gigabyte, Megabyte
Byte, Kilobyte, Megabyte, Gigabyte, Terabyte
Convert 17 (decimal) to binary
10001
Convert 17 (decimal) to hexadecimal
11
Convert 0011 1000 (binary) to decimal
56
What effect do left and right shifts have on binary numbers?
Left shifts multiply a binary number. For every place shifted left, the number is doubled
Right shifts divide a binary number. For every place shifted right, the number is halved
Convert 1001 1111 (binary) to decimal
159
Convert 1001 1111 (binary) to hexadecimal
9F
Convert 10 1011 (binary) to decimal
43
Convert 10 1011 (binary) to hexadecimal
2B
Convert 4A (hexadecimal) to decimal
74
Convert 4A (hexadecimal) to binary
1001010
Convert 75 (hexadecimal) to decimal
117
Convert 75 (hexadecimal) to binary
1110101
Convert 148 (decimal) to binary
10010100
Convert 148 (decimal) to hexadecimal
94
Convert 240 (decimal) to binary
11110000
Convert 240 (decimal) to hexadecimal
F0
Convert BD9 (hexadecimal) to decimal
3033
Convert BD9 (hexadecimal) to binary
101111011001
Encode this string using run-length encoding:
PPPPQQRRRSSSSSSPPPPPQQQ
(4,P), (2,Q), (3,R), (6,S), (5,P), (3,Q)
Calculate the number of bits need to store this string if it was encoded with ASCII:
PPPPQQRRRSSSSSSPPPPPQQQ
23 x 8 = 184 bits
Why do programmers prefer hexadecimal over binary and decimal?
It is simpler to remember large numbers in hex - they’re far shorter than binary numbers
Due to them being shorter, there’s less chance of input errors
It’s easier to convert between binary and hex than binary and decimal
What is the definition of a character set?
A collection of characters that a computer recognises from their binary representation