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
colour or bit depth
- no. bits used to represent each colour
- higher bit depth = greater range of colour
- a pixel is given a no. bits (n)
- the no. combinations (2^n) dictates the bit depth and number of colours represented
1b = 2 colours
8 b = 2^8 colours
file size
resolution x bit depth
or height x width x bit depth
eg 20 x 20pixels and 8 colours
= 20 x 20 x 3 = 1200
higher resolution and bit depth = better quality but larger files
meta data
data about data
info other than the image data stored within a file
eg colour depth, resolution, date created, author
analogue sound
continuous waves
(one constant line)
digital sound
discrete waves
digitised by measuring and recording sound waves
(blocks at diff amplitudes)
analogue > digital converter
converts inputs to digital signals
sound sample
a measure of amplitude at a point in time
sampled using sample resolution (bit depth) and sampling rate
sampling rate
no. samples taken per second
1Hz - 1 sample per second
usually 44.1kHz
greater sample freq. = greater the accuracy + file size
(more samples = more bits)
sample resolution (b depth)
the no. bits used to record each measurement
increased bit depth = better quality (can represent more sound + height of wave is accurately measured) = greater file size
usually 16b = 2^16 values
file size of sound
sampling rate x sample resolution x duration (secs)
character set
a list of the characters and the binary codes used to represent each one
eg ASCII or UNICODE
compression
reducing the file size using an algorithm
used to:
- send files with smaller size
- store files with less storage (cheaper)
- send files faster
- reduce download size
lossy compression
removes info permanently
removes info less likely to be noticed by human eye
significant file size reduction can not be converted back
lossy compression eg
JPG
MP4
MP3
never text - would delete characters
can be used for video, music, photos
lossless compression
reduces file size sometimes
doesn’t loose any info
file can be converted back (data is restored exactly like it was originally)
lossless compression eg
PNG
PDF
GIF
TIFF
FLAC
can be used for images, text, music
lossless algorithms (2)
RLE - run length encoding
huffman trees
RLE
uses freq. / data pairs to encode
each run length of the same coloured pixel
eg 1 = - and 0 =.
-…- = 10001 = 11 30 11
useful on simple images not text (can increase file size)
huffman trees
analyse freq. that characters are used
characters are placed in binary tree structure with most frequent at top
how to work out file size reduction
original - new size / original
benefits of compression
- smaller files = fewer packets = faster transmission (quicker + reduced traffic)
- reduces download times (streaming possible)
- images on web pages appear faster
- reduces space on disk/ servers
boolean operators
NOT
OR
AND
XOR
truth tables
shows what happens if each combination of true / false is used
boolean logic
in which the answer is true or false (only 2 states)
1 = T
0 = F
AND logic gate
both conditions true = true
P = A AND B
P = A.B
=D-
NOT logic gate
condition is false = true
P = NOT A
P = Ā
=>-
OR logic gate
one or more conditions are true = true
P = A OR B
P = A+B
= )>-
XOR logic gate
only one condition is true = true
P = A XOR B
P = A ⊕ B
=))>-
hardware
The physical components that make up a computer system
software
non-physical programs that are stored by and run on a computer system
hardware eg
input - mic keyboard mouse
output -monitor speaker printer
storage - USB stick hard-drive
software eg
word processing software, instant messaging, email, operating system, web browser
computer system
combination of hard+ soft-ware working together
takes a set of digital inputs processes them and creates a set of outputs
input -> process (<->secondary storage) -> output
2 types of software
system
application
software -> system -> (OS or utility programs)
or -> application
system software
provides a platform for other softwares to work
e.g. OS or utility programs
application software
apps that allow use to perform tasks as the general user (play games, write essays)
operating system
processor management
storage management
memory management
input/ output device management
application management
security management
multitasking
application managment
controls access to apps the user instals
allows user to use authorised programs
allows user to install/uninstall apps
manages software updates
copies the program to and (allocates it to)an area of their RAM
memory management
-lets data be copied onto main memory
-keeps a record of where each program and data is (easy and fast to access)
- makes sure not to overwrite existing files
multitasking
Allows multiple tasks to run simultaneously (without would only ever be able to do one thing)
provides a task manager - can see what current task is taking up space / memory on the CPU (can then close this task to run efficiently)
peripherals
external components to a computer system e.g. keyboard
interrupts
signals sent to the CPU by external devices to indicate an event that needs immediate attention
e.g. mouse click ->response is opening document
- hardware interrupts - by hardware device e.g. printer out of paper
- software interrupts - by program - error message displayed
network
connection between 2 or more devices to share info / communicate
stand alone
not on a network can’t share or communicate with other devices
5 ways user managment is used on your schools network
- provides and username/ password - only allows those authorised to access your files on school network
- provides access rights - not all can access certain files or areas
- secondary storage can’t be used / accessed so virus’ aren’t downloaded onto the network
- users restricted from installing new software which prevents introduction of malware or software conflicts
- settings/ profile managed by administrators
utility software
perform extra functionality + housekeeping tasks to keep computer running efficiently
utility software eg
encryption software
defragmentation software
data compression
disk clean up tools
anti- virus software
encryption software
used to encode text so cannot be understood without a key to decode it e.g. files/passwords
data compression software
makes files smaller in size
to reduce storage space and send files using less data
disk clean up tools
scans + finds files no longer needed
finds duplicate files
deletes and frees up space
anti virus software
detects harmful files from infecting devices with malware
warns + informs of dangers
(prevents getting virus)
quarantines + removes virus
can’t fix harm caused by virus
disk defragmentation software
reorganised files so they are stored together
read faster and new files don’t need to be fragmented
embedded system
A computer system with one dedicated task ( no multitasking)
built into a physical device
e.g. camera, microwave, washing machine, card reader, toaster, oven, traffic light
what is a programming language
used to give a series of instructions to devices to perform a specific task
two levels of programming languages
low-level e.g. machine code assembly language
high-level e.g.python, Java
macine code
binary instructions (1,0) slow and inefficient what the computer understands
each processor only understands its own type of machine code - can’t use apple apps on a samsung (diff processor types)