Comp1-Data rep Flashcards
Convert a negative denary number to twos complement.
- Find the binary value for the positive number.
- Flip all the digits.
- Add 1 to the result (actually add 1 with binary addition)
Convert a negative twos complement to denary? 2 methods
- Flip the bits. Add one . work out denary.
2. using the place values and adding these up.
In binary subtracting do…..
turn the number being subtracted into a twos complement
add this.
Why is hex used?
as a short hand notation for binary, so we can read and write it more easily.
Whats the most significant bit?
The leftmost bit. (highest value)
what is the least significant bit?
The rightmost bit. (lowest value)
COnvert denary to hex?
convert to binary.
divide into groups of 4, starting from the right.
convert each group of 4 into hex.
What is the range of sybols in hex. (what is 15 and 0 in hex?)
0-9 then A-F (with F=15, 0=0)
how do fixed point binary number work.
the decimal is in a set place. to the left the place values increase normal.
to the right they start with 1/2 , 1/4 , 1/8 so on.
How many characters are in ASCII, how many bits is this?
128, 7 bits.
What is A in ASCII?
65 (the next 26 are the other capitals)
What is a in ASCII?
97 (the lower case is the uppercase +32)
whats the eight bit in ASCII used for?
Error checking.
how many bits does UniCODe use?
16 bits ( the first 128 are the same as ASCII)
How does a single parity bit work?
its set so either the total number of 1s = odd or even, this then gets checked to see if it matches.
This can detect a odd number of mistakes.
What is majority vote? And is it any good?
sending the same data 3 times and usung the most common bit value(for that specific bit) to represent that bit.
This is very expensive as three times the data has to been sent.
How does hamming code work.(the pairty bits)
The 1,2,4,8,16….. bit are used as parity bits
position one checks odd numbered bits and is set so they’re even
Bit 2 checks alternate pairs eg 2,3..6,7..10,11
Bit 4 checks alternate quads eg 4,5,6,7..12,13,14,15
Bit 8 checks alternate 8s
how do you correct an error with hamming code?
check the parity bits, fine all the wrong ones. add up their values, this will be the location of the incorrect bit.
Why is hamming code still used?
provides a good balance between error detection and correction - Used in wireless communication.
What is gray code?
A binary representation where two consecutive values differ in only one bit.
What is the full name for gray code?
Binary reflected gray code.
Why is gray code popular?
it prevents some data errors that can occur during state changes in slower systems to improve reliability.
Used in counters as only one bit has to change at once and this reduces energy used.
When is gay code used.
In angular movement systems. The reader may store halfway between two values and read both, however since they only differ by 1 bit the value read is guaranteed to be one of the two.
How do you convert binary to gray code?
Start at the rightmost bit, if the bit to the left is a one invert it. leave the leftmost bit unchanged.
1000–>1100, and 1010–>1111
What is a pixel?
the smallest addressable area or smallest solid block of colour in a image.
What is a bitmap?
created when the pixels of an image are mapped to positions in memory that store binary codes representing the colour of each image.
what si the Resolution of a VDU
a quantity expressed as the number of pixels per row by the pixels per collumn.
What is the resolution of a image?
the number of dots(pixels) per inch or centimeter.