Devices Flashcards
What is an analogue system?
Analogue systems have values that vary continuously
What are digital systems?
Digital systems consist of discrete values (not necessarily two)
Why are digital systems good?
As they are much more resistant to noise
What is a bit?
A single binary digit
What is a byte?
8 binary digits
What is a nibble?
4 bits
How to convert from decimal to binary?
- Successively divide number by 2 and record remainder (1 or 0)
- Stop when the result of the division is 0.
- The remainders read “backwards” giving binary result
How do you convert binary to decimal?
- Multiply the first non-zero bit by 2 and add the bit to its right
- Continue with the remaining bits and stop after adding the smallest bit
What is ASCII?
ASCII (American Standard Code for Information Interchange) is a method for representing characters.
ASCII - 7 bits
Extended ASCII - 8 bits
Why did unicode replace ASCII?
Unicode contained more bits to represent more symbols and characters of different languages
What is sign and magnitude?
Method of representing negative numbers based off the first bit.
+ - 0
- - 1
What is an issue with sign and magnitude?
- One bit is used to represent the sign
- First bit is not involved in addition and determines what operation takes place.
How does twos compliment work?
The first bit represents negative of the original value
How do you convert a number into its negative using twos complement?
- Write number in binary
- Invert all the bits
- Add 1
What is fixed point arithmetic?
Where the decimal point stays in the same place of the binary number
What is the structure of an IEEE floating point number?
1 bit for the sign
8 bits for the exponent
23 bits for the mantissa
How do you normalise a floating point number to be stored as an IEEE floating point number?
Alter the exponent so that the number reads 1. (whatever digits come next)
How does floating point arithmetic work?
- Identify number with smaller exponent
- Make the smaller exponent equal to the larger exponent
- Add or subtract the mantissas
- Normalise if necessary
- Truncate or round mantissa
What is commutativity?
Order of arguments are not important.
i.e. A AND B = B AND A
What is associativity?
Ordering of sub-expressions with the same operator does not matter.