Representing Data Flashcards
In what Language do computers operate in
Binary, 0s and 1s , everything we need to represent must be transformed in these 0s and 1s
What is string concatenation
String contentation occurs when you use an addition operator between two strings to combine them into one.
How does the addition operator act in different ways
It can perform addition on strings by combining them directly or it can computer the sum of numbers.
Within binary what do the 1 and 0 represent
1 represents that an electrical signal has been read or transmitted whereas a 0 is the privation of an electrical signal
What is a 64 bit computer
When the computer handles strings of 64 bits for transferring data. This results in double transfer speeds than previous 32bit machines
How many bits did computer utilise in the 1980s when Sonic was released
8 bits
What are the basic types of data supported by programming languages
- Integers - whole numbers
- Decimals - fractions
- Strings - sequences of characters
How many bits are utilised to represent a character in a string
8 bits represenmting 256 different chracters
* The ASCII dataset uses 8 bits to represent 256 different character
What is unicode
An alternative to ASCII useful for other languages and supports more than 8 bits per character allowing much more options
What is meant by a denary base number system
A number system that is commonly utilised by humans such that a number 123 = 1 x 100 + 2 * 10 + 3 * 1, it utilises 10^n+1 to move a position with 10 combinations per space
What is a base 2 number system
A base 2 number system utilises 2 possibilities per space and 2^n+1 to move each position up. Such that 0110 = 6
What are some benefits of utilising binary in a computer system
Much hardware that is used with computers such as HDD and CDs that engrave pits to represent 1 and absence of for 0.
Similarly systems experience a lot of noise which can alter the states, if there are more states this will result in a higher likelihood of errors
What is the range of an 8 bit number system
0 - 255
What is hexadecimal notation
It is taking each group of four bits and representing it with a single digit
Hexadecimal
0000 0 0
0001 1 1
0010 2 2
0011 3 3
0100 4 4
0101 5 5
0110 6 6
0111 7 7
1000 8 8
1001 9 9
1010 10 A
1011 11 B
1100 12 C
1101 13 D
1110 14 E
1111 15 F
How do we represent negative numbers in sign bit representation
Utilising the left most bit as a sign bit, 0 indicated positive and 1 indicated a negative.
What is the sign magnitude representation
It utilises the left most bit as a sign 0 being positive and 1 being negative, the rest of the bits represent their usual value
What are the benefits of using a sign magnitude bit
Allows us to see if a number is negative or positive in value by evaluating the left most bit
What happens to the range of bits when implementing sign magnitude bits
overall representation of numbers remains the same however two expressions for 0 and there is positive number impacted
2^8 = 0 -255 = 256 nums
2^8 = 2^8-1 = -127 – 127 = 256 nums
as 1 bit is used for sign magnitude
What is a negative implication of using the sign magnitude representation
There are two representations of zero such that positive 0 = 0000 and negative 0 would be expressed as 1000.
Therefore the n bit representation has only ((2^n) -1) different values