Back to marketplace

1.4.1 Data Types - Done

No description yet. This curated deck is ready for daily study.

Total cards: 24•Content version: v4•Public deck•Updated: 8/1/2026

Card preview (24)

#1
Front (Question)

Name each primitive data type

Back (Answer)

-Integer -Real/floating point -Character -String -Boolean

#2
Front (Question)

What is the purpose of data types?

Back (Answer)

They are needed so the computer knows how to store, process and interpret data correctly so that only valid operations are performed on data.

#3
Front (Question)

What is an integer?

Back (Answer)

A whole number

#4
Front (Question)

What is a real/floating point data type?

Back (Answer)

A decimal number

#5
Front (Question)

What is a character?

Back (Answer)

A single letter, digit or symbol

#6
Front (Question)

What is a string?

Back (Answer)

A sequence of characters

#7
Front (Question)

What is a boolean data type?

Back (Answer)

A data type with only 2 possible values – true or false

#8
Front (Question)

What types of data can be represented in binary?

Back (Answer)

Numeric, text, image and sound

#9
Front (Question)

How is binary used to represent text?

Back (Answer)

Through their use of the character sets ASCII and Unicode. Each character is given a unique binary code. Increasing the number of bits for each character increases the number of possible characters that can be stored

#10
Front (Question)

How is binary used to represent numbers?

Back (Answer)

Positive denary numbers can be represented through binary. Negative binary numbers can be stored using Sign and Magnitude and Two’s Compliment. Floating point binary can be used to store decimal numbers.

#11
Front (Question)

How is binary used to represent images?

Back (Answer)

Images are split into pixels. Each pixel is given a binary value which represents colour.

#12
Front (Question)

How is binary used to represent sound?

Back (Answer)

Analogue sound is sampled. A sample is a reading that is taken at a certain point and stored as a binary number.

#13
Front (Question)

Why do computers use binary?

Back (Answer)

Computers are made up of switches which have 2 states: on and off. This can be easily represented using binary as it also has 2 states that can represent on and off: 1 and 0.

#14
Front (Question)

Describe Sign and Magnitude

Back (Answer)

The number is written the same as in regular binary, however the left-most bit has become a sign bit (no longer representing a weighted value, but instead a sign) with 1 representing a negative number and 0 for if the number is positive.

#15
Front (Question)

Describe Two’s complement

Back (Answer)

Negative numbers are represented starting from 11111111 as the denary value -1. Starting from the right-most digit, you write the binary number exactly how it would appear in regular binary, up to and including the first 1. From that point onwards, swap every 0 for a 1 and vice versa.

#16
Front (Question)

State the advantages of storing values using Two’s complement rather than Sign and Magnitude

Back (Answer)

• Calculations are easier to perform • Two’s complement allows for a larger range of numbers to be stored • It has only one representative station for 0 • No additional hardware is required

#17
Front (Question)

Describe how to do binary subtraction using the borrowing method

Back (Answer)

1 - 1 = 0 1 - 0 = 1 0 - 0 = 0 0 - 1 = 1, make the next digit of 1 a 0 and the digit to the right of it a 2

#18
Front (Question)

Describe how to do binary subtraction using Two’s complement

Back (Answer)

Add the negative version of one number to the positive of the other number to get the two’s complement form of the result. [a - b = a + (-b)]

#19
Front (Question)

What are the benefits of using hexadecimal over binary?

Back (Answer)

-Hexadecimal values are shorter than binary so 4 bits can be represented using one character -This means they are faster, and more reliable to write down and read

#20
Front (Question)

How are decimal numbers represented in floating point binary?

Back (Answer)

The mantissa of a floating point number holds the actual digits of the value and represents the precision of the number. It’s usually 5 bits long. The exponent controls the size of the number as it governs where the decimal point is positioned. It’s usually 3 bits long. The exponent is written in Sign and magnitude. The decimal point starts between the first and second digits. If the exponent is positive the decimal moves right, if it’s negative it moves left. Each digit after the decimal represents 1/2^n (with n increasing the lower the digit is).

#21
Front (Question)

What is the benefit of using a normalised form when representing data as a floating point number?

Back (Answer)

• It allows for greater accuracy from the given number of bits. • The representation of each binary value is unique.

#22
Front (Question)

Describe how a normalised number should appear

Back (Answer)

A floating point where the mantissa starts with 01 if positive or 10 if negative. The normal exponent should be the difference between where the decimal point would be based on the original exponent and where it is after normalisation (negative if the normalised is further right, positive if it’s further left)

#23
Front (Question)

How do you perform a logical shift?

Back (Answer)

By moving all the bits in a binary number left/right a set number of places. In a right shift, the right most bits should be discarded. In a left shift, the empty righthand bits should be filled with zeros.

#24
Front (Question)

What do right and left shifts do to the numbers?

Back (Answer)

A right shift divides the number by 2, a left shift multiplies the number by 2.