1.4.1 Data Types Flashcards
What is an integer?
A whole number
Can be positive or negative
What is a real?
Positive or negative number
Can have fractional part
What is a character?
A single symbol
Includes letters, numbers & symbols
What is a string?
A group of characters
Can store one or more characters
What is Boolean?
True or False
What is a bit?
A single binary digit
What is a byte?
Eight binary digits
What is a nybble?
Four binary digits
Which bit is the least significant?
The furthest to the right
Which bit is the most significant?
The furthest to the left
What is Sign Magnitude?
The equivalent of adding a + or - sign in front of a number
How is a negative number represented using Sign Magnitude?
By adding a leading 1
How is a positive number represented using Sign Magnitude?
By adding a leading 0
Describe how a number can be put into two’s complement.
Flipping the bits of positive number
Adding one
How is binary subtraction performed?
Using binary addition with a negative two’s complement number
What base is hexadecimal?
16
What characters are represented by 10-15 in hexadecimal?
A-F
What is floating point binary?
Binary numbers with a mantissa & exponent
Where is the binary point in the mantissa of floating point binary?
After the most significant bit
How is floating point binary converted into denary?
Exponent converted to denary
Binary point of mantissa moved according to exponent
What is the benefit of floating point binary?
Increased precision
Larger range of numbers can be stored
What is meant by normalised floating point binary?
Mantissa starts 01 for positive number
Mantissa 10 for negative number
Describe how addition can be performed with two floating point binary numbers.
Both exponents the same
Add mantissas
Normalise result if required
Describe how subtraction can be performed with two floating point binary numbers.
Both exponents the same
Mantissa of number to be subtracted converted to two’s complement
Binary addition carried out
Normalise result if required