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
What is a logical shift?
Involves moving all of the bits in a binary number of a specified number of places to the right/left
What is the result of a logical shift left?
Multiplication
What is the result of a logical shift right?
Division
What is the effect of a logical shift left by one place?
Initial number doubled
What is the effect of a logical shift right by one place?
Initial number halved
How are masks applied to binary numbers?
By combining them with logic gate
What is a character set?
A set of characters that can be represented by a computer
How many bits does ASCII use?
7 bits
Whats the maximum number of characters represented by ASCII?
128 characters
What is the drawback of ASCII?
Limited character set
How many bits does Unicode use?
Varying amount