Computing

Cards (48)

  • A computer is an electronic device that: takes an input, processes data and delivers output
  • Fetch:
    Fetching the next instruction from the main memory (RAM)
    Brings the instruction back to the CPU
  • Decode:
    Inspects the instruction and works out what it is that needs doing
  • Execute:
    Carries out the instruction (e.g. perform calculation; store info into memory; grabbing data from memory)
  • Hardware= physical stuff that makes up the computer, like CPU, motherboard, monitor and printer
  • Software= Programs/Applications that a computer system runs (e.g. an operating system; a word processer; a video game)
  • Embedded system= Computers built into other devices like dishwashers, microwaves, and TVs, they are usually dedicated systems
  • Components of CPU:
    Arithmetic Logic Unit
    Control Unit
    Cache
    Registers
  • ALU: performs calculations and logical decisions
    CU: sends signals to control how data moves around the CPU
    Cache: provides fast access to frequently used instructions and data
    Registers: tiny super fast pieces of onboard memory inside the CPU each with a very specific purpose (PC, MAR, MDR, Accumulator)
  • Von Neuman Architecture:
    CU
    ALU
    Memory unit (RAM)
    Inputs & Outputs
  • Registers:
    Program Counter: holds the address of the next instruction in memory
    Memory address register: holds the address of where data is to be fetched/stored
    Memory data register: holds the data fetched from, or to be written to memory
    Accumulator: holds the results of calculations
  • What affects CPU performance?
    Clock Speed
    Cache Size
    Number of Corea
  • Clock Speed: measured in cycles per second (Hz), number of instructions fetched per second (theoretically)[overclock = heat & damage]
    Cache Size: Size of temporary storage of data and instructions being read from and written to the main memory (RAM); much quicker to read from than the RA, so reduces the need to go and get instructions [bigger=slower]
    Number of Cores: (Core= complete copy of CPU); Doubling the number of cores doesn't double processing speed due to communication between cores [many programs aren't designed for multiple cores]
  • Properties of embedded systems:
    Low power consumption
    Small size
    rugged operating ranges
    low cost per unit
  • Primary Storage= holds data and instructions that the CPU needs to access whilst the computer is running
  • Primary Storage consists of:
    RAM
    ROM
    Registers
    Cache
  • RAM=holds programs and data currently in use by the CPU; is volatile; can be read or written and is large
    ROM= holds start up instructions for the computer (bootstrap/BIOS); In embedded systems may start program; read only; small
  • Secondary Storage= stores programs and data when power is turned off (semi-permanent storage of data that can change), backs up and archives files
  • Types of Storage?
    Optical (CD-R,RW,DVD-R/RW, Blu-Ray):
    Low capacity; slow to access; thin, light-weight, portable, cheap
    Magnetic (Hard Disk drive, tape):
    High capacity; quick to access; moving parts eventually fail, perform best defragmented, cheap
    Solid State (SSD, Memory sticks, Flash memory cards):
    Medium capacity; very quick to access; no moving parts, no noise, low power, no need to defragment; expensive
  • How do they store:
    Optical= Pits/Lands
    Magnetic= magnetic north/south poles (magnetised/demagnetised)
    Solid State= Floating gate transistors (FGTs) do/don't hold a charge
  • Units
    Bit=b=0.25 bytes
    Nibble=0.5 bytes
    Byte=B= 1 byte
    KiloByte=KB=1,000 bytes
    MegaByte=MB=1,000KB
    GigaByte=GB=1,000MB
    TeraByte=TB=1,000GB
    PetraByte=PB=1,000TB
  • Two states why:
    Easier to manufacture
    cheaper
    more reliable
  • CONVERSIONS BINARY HEX DEANERY
  • Representing Characters:
    A character set= a defined list of characters recognised by the computer
    Each character is represented by a unique binary number (e.g. ASCII 128 characters; Extended ASCII 256 characters; UNICODE >16 million characters)
  • Colour depth= the number of bits used for each pixel (bpp)
    Number of colours= 2^bpp
    Image resolution= The number of pixels in the image (width*height)
    File Size= image resolution*colour depth (bits)
  • Pixel= A tiny dot with a colour represented in binary code to make up a bitmap
    Bitmap= Images made up of lots of pixels
    Metadata= Information stored in an image file which helps the computer recreate the image on screen (e.g. file format, height, width, colour depth, resolution)
  • Greater image resolution= higher quality & file size
    Greater Colour depth= More colours to be represented & more file size
  • (Vector pixtures store the mathematics to draw coloured shapes)
  • Sound file size= number of bits in a sound
    sample rate (Hz) * bit depth * duration (s)
    Bit depth= the number of bits available for each sample; the more bit depth, the greater the quality and file size
    Sample Rate= number of samples stored per second (Hz) usually 44,100Hz ; greater the sample rate, the greater the quality and file size
  • How is sound stored?
    Sound is recorded by a microphone as an analogue signal; pieces of continually changing data, through an approximation of the original sound wave
    Analogue signals need to be converted into digital data so that computers can read and store sound files, in binary. This is done by analogue to digital converters, found in most modern recording devices.
    Sampling= Process of converting analogue to digital
  • Compression= reducing the number of bits in a file:
    Making storage capacity lower
    Data transfers quicker
    More data can be stored on a storage device
  • Two types of compression:
    Lossy
    Lossless
  • Lossy Compression: (MP3 AAC JPEG)
    Some of the data is permanently lost
    Greatly reduces file size
    Reduces quality of images/sound
    Suitable for images, sound & video
    Cannot be used on text nor executable files
  • Lossless Compression: (FLAC, TIFF, PNG)
    None of the data is lost; encoded differently
    Can be turned back into original format
    Can be used on all types of data
    Usually less effective
    Most suitable for documents and executable files
  • 3 Elements of computational thinking?
    Abstraction
    Decomposition
    Algorithmic thinking
  • Abstraction= The process of removing unnecessary details and only including the relevant details
    Decomposition= breaking a complex problem down into smaller more manageable parts
  • Flowcharts
    Terminal= Oval
    Process= Rectangle
    Decision= Diamond
    Input/Output= Rhombus
    Sub routine= rectangle with two lines on left and right (inside)
    Line= arrow
  • Binary Search:
    1,2,3,4,5,6,7,8,9,10,11 (Find 2)
    6>3
    1,2,3,4,5
    3>2
    1,2
    2=2
  • Linear Search:
    1,2,3,4,5 (Find 3)
    1!=3
    2!=3
    3=3
  • Linear Search
    +much simpler (code/run)
    +used on any type of list (not sorted)
    -Inefficient
    -Only used on small lists