theory Flashcards
why do computers use binary
- circuits in a computers processor are made up of billions of TRANSISTORS
- a transistor is a tiny switch that is activated by the ELECTRONIC SIGNALS it receives
- the digits 1/0 used in binary reflect the ON/OFF states of a transistor
units for data storage
1 bit b = 1/0
1 nibble = 4b
1 byte B = 8b
1 kilobyte kB = 1000B
1 megabyte MB = 1000kB
1 gigabyte GB = 1000MB
1 terabyte TB = 1000GB
Kites Make Great Toys
overflow error
error from attempting to represent a number thats too large for the registers available
eg biggest 8b number is 255 - so over 8b cant be represented
binary > decimal
place values
128, 64, 32, 16, 8, 4, 2, 1
eg 7 = 0000 0111
binary addition
1 + 0 = 1
1 + 1 = 0 carry 1
1 + 1 + 1 = 1 carry 1
hexadecimal uses
colour
MAC address
why humans use hexadecimal
- simpler to remember
- quicker to write/type
- less likely to make errors (fewer digits)
- easy to convert hex to binary
hexadecimal
base-16 number system
uses 0-9 and A-F to represent numbers from 0-15
hex > decimal
place values 16, 1
multiply left hand by 16 then add right hand
eg hex 37
= 16x3 +7
= 55
decimal > hex
divide by 16 to get left column
remainder = right column
eg 27
= 27/16 = 1r11
= hex 1B
binary > hex
splits into 2 nibbles of 4b
convert each nibble into hex using
8, 4, 2, 1 place values
eg 1110 0101
= 8+4+2= 14 4+1=5
= E5
hex > binary
split hex characters
convert into binary using 8, 4, 2, 1 place values
eg 3B
3 = 0011
B = 11 = 1011
= 0011 1011
binary left shift
x2^no. bits shifted
binary right shift
/2^no. bits shifted
standard ASCII
American Standard Code for Information Interchange
encodes 128 characters into 7b codes
includes 0-9, A-Z, a-z, punctuation
extended ASCII
encodes 256 characters into 8b codes
includes accents
1 character = 1B
limitations of standard ASCII
- encodes 128 characters into 7b codes
- only covers Latin alphabet
- those who don’t use latin alphabet cant communicate eg Chinese, Greek, Arabic
advantages of ASCII
- uses English language so it can store all alphanumeric characters
- takes less space as it has only 128 characters
unicode
first 128 characters are the same as ASCII
unicode was developed to use 16b per character to represent 2^16 characters
can also use 32b per character to represent 2^32 characters
advantages of unicode
can represent more characters such as other alphabets and emojis
useful for global communication
disadvantage of unicode
uses up more storage / data
how pixels make up an image
- make up bitmap images
- each pixel is a single colour and given a binary value which represents that colour
- the smaller the pixels the better the quality
- a pixels colour can be changed by changing the binary value
pixel
smallest identifiable area of an image
make up bitmap images
resolution
concentration of pixels within a specific area
(area is defined by image width x height in pixels)
eg 72ppi is a typical screen resolution