chapter 1 - information representation Flashcards
denary numbers
base 10 use digits 0-9
place values …100,10,1
binary numbers
base 2 use digits1/0
each is a bit
place values 128…8,4,2,1
- computers can only recognise on/off states of transistors so has to use 1/0
hexadecimal numbers
base 16 use digits 0-9,A-F
place values …256(16^2),16,1
1 hex digit = 1 nibble
binary number
bit - 1 digit
nibble - 4 digits
byte - 8 digit
3 digit hex
12A
256 + 32 +10
=298
decimal prefixes
kilo (k) x10^3
mega (M) x10^6
giga (G) x10^9
tera (T) x10^12
(use base10)
binary prefixes
kibi (Ki) x2^10
mebi (Mi) x2^20
gibi (Gi) x2^30
tebi (Ti) x2^40
(uses base 2)
ones complement
the binary number obtained by subtracting each digit in a binary number from 1
(flip all the numbers to the opposite eg 1>0)
twos complement
the ones complement of a binary number plus 1
– the most significant bit becomes negative – holds the signed value
why use twos complement
to represent signed integers rather than just their magnitude
benefits
- one representation of zero
- computer can’t subtract only add
binary addition
0+0= 0
0+1= 1
1+1= 0 (carry the 1)
1+1+0 = 0 (carry the 1)
1+1+1=1 (carry the 1)
binary subtraction
0-0 = 0
0-1 = 1 (borrow a 1)
1-0 = 1
1-1 = 0
(or just + the twos compliment of the number)
overflow error
when the result of a calculation is too large to fit in the number of bits defined for storage
eg if storage uses 8bits and result is larger than 256
binary coded decimal (BCD)
uses a nibble to represent a denary digit
- useful in apps that require single deanery digits to be stored
- convert each digit into binary using a nibble - if over 9 you have to +6 (can’t represent 10 using one denary place value)
- used for digital clocks, calculators, currency
packed BCD
when 2 BCD nibbles are stored in one byte
ASCII
American Standard Code for Information Interchange
represents 2^7 characters
mainly represents latin alphabet languages
unicode
represents 2^16/32 characters
can represent other languages and symbols
vector graphics
consists of drawing objects defined in a drawing list
list contains a command for each object included in the image - which has a list of attributes defining the property of the object eg the geometric data (centre of circle)
dimensions are not explicitly defined but are relative to the canvas so it can be scaled up/down
drawing objects
component defined by geometric formulae and associated properties
drawing list
one set of values for each drawing object eg commands which have attributes that each define a property
property - defines one aspect of the appearance eg colour, line thickness, line colour
vector graphic resolution
zooming in and out has no effect on the resolution as its scalable
Vector uses less memory than a bitmap – vector stores an algorithm to draw rather than every pixel
bitmap images
divided into pixels - smallest identifiable area of an object
- each pixel is given a colour to build up a picture
pixel
smallest identifiable component of a bitmap image
single square of one colour
defined by its position and colour