Topic 2 - Computer Organisation IB Computer Science Notes
Topic 2 - Computer Organisation IB Computer Science Notes
Computer Architecture
- CPU:
- Fetch, decode and execute instructions from RAM
- Contains registers and control busses
- RAM:
- Random access memory
- Primary storage
Inside CPU
Primary storage/ main memory/ memory
RAM and ROM
The wires that connect components together are known as buses.
RAM
RAM is volatile, when the computer is turned off it empties. Memory cells controlled by a
transistor and the capacitor contain the memory.
Capacitors
VRAM
If the RAM gets full, an area of a hard drive gets set aside as the VRAM (virtual RAM).
This slows down computer speed as it is further away from the CPU. You can adjust the
amount of VRAM you want by the operating system. It goes in the hard drive.
Types of RAM:
- Static RAM: never refreshes, simpler modules, cheaper, higher performance - lower
energy. SRAM. QUICKER AND MORE ENERGY EFFICIENT.
- Dynamic RAM: refreshes more often, more complex, capacitor needs charging all
the time. DRAM. MORE DATA BUT CONSUMES MORE POWER.
Main memory
Different types of main memory are used for different things.
ROM has embedded programs in household items such as chargers or microwaves.
EEPROM: can deal with data and act as a hard drive, they can be updated. Individual bytes
of data that can be erased and reprogrammed.
Non-volatile ROM that enables individual bytes of data to be erased and reprogrammed.
ROM uses BIOS, then loads operating system (bootstrapping)
CMOS: Roms own memory location, if this fails, computer will not turn on, it stores the
BIOS system.
CACHE: holds recently or frequently used data so the computer does FDE faster. Stores a
subset of data, typically transient in nature, so that future requests for that data are served
up faster than is possible by accessing the data's primary storage location.
Registers
1 bit
8 bits = 1 byte
4 bits = 1 nibble
Fetch:
- Address is transferred to memory address register MAR
- MAR is loaded into MDR, address in program counter increments by 1 - unless jump
was ordered by instruction
- MDR is transferred to current instruction register CIR
Decode:
- CIR is examined, ALU could become activated
Execute:
- Instruction is executed
Secondary memory
Persistent Storage
Secondary memory is used for the long term storage of data on a computer system.
Secondary memory is non-volatile, storing programs and data before, during and after the
running of a program. We need it because we need to store data after our computer is shut
off.
Units of storage
Bit 1 or 0
Byte 8 bits
Word Processor register size (32 4-8 bits
or 64 bits)
Kilobyte 1024 bytes 1000 bits
Megabyte 1024 kilobytes 1000000 bits
Gigabyte 1024 megabytes 1000000000 bits
Terabyte 1024 gigabyte 1000000000000 bits
Nibble 4 bits
Operating system
- DOS
- Microsoft Windows
- Mac OS
- Unix
- Linox
- Ios
- Android
- Chrome OS
Hierarchy of software
- Software:
- System software:
- Operating system
- Utilities
- drivers/ libraries
- Application software - 7 types
UI (user interface)
The OS uses UI to provide a link between the user and the computer hardware.
Types:
- Command Line Interfaces (CLI): where the user types command
- Menu Based Interfaces (MBI’s): gives user selection of options
- Graphical User Interfaces (GUI’s): have Windows, Icons, Menus and Pointers
(WIMP’s)
- Natural Language Interface (NLI’s): user speaks to interface
CLI
- Literally type your next command in
- Only on keyboard no mouse
- Fast to use/do not take hands off the keyboard
- Had to learn all commands
- Advantages: fast to use/operate
- Disadvantages: slow/hard to learn all different commands
MBI
- Advantages: easier to use than CLI
- Disadvantages: limited options for control
GUI
- Known as desktop metaphor
- It was a great innovation
- Advantages:
- much easier to use than the menu system/CLI.
- Easier to visualise/ learn
- Disadvantages:
- Slower to operate
- More resources required
- Graphics
- RAM
NLI
- Advantages:
- Fast access
- Easy access
- Disadvantages:
- Misunderstand
- Restricted in what you can use it for
- It can always hear you
Memory Management
Loading data and instructions from storage like HDD and controlling which application has
access to which area of memory RAM.
- Each location in memory can be read, modified, and written to by the OS.
- When the memory location is full the OS sends a confirmation message.
- OS provides file management services by sorting out where data is stored on the disk
drives and memory.
- OS allows users to organise files in folders, copy and delete them and control access.
Peripheral management
External device that is connected to the computer; keyboard, mouse. They are controlled
through device drivers.
A device driver is a software program which allows hardware devices to be used by the OS.
Translators between devices and applications.
Security management
Prevents unauthorised access
- Ensures security of the system; password
- OS protects files from other users reading or writing files
Multitasking:
OS coordinates the working of different programs by allowing the CPU time between
different programs based on time and priority of the software application.
- Each task is given a slice of time, or a turn on the CPU.
- Each task has to wait its turn unless it is given a higher priority by the OS in which
case it gets more or longer time slices.
Application Systems:
Application Software
Programs used to accomplish specific tasks:
- Utility programs: management and maintenance of a computer system. Backup
programs.
- Generic: general purpose software written application in different fields. Word
processors, spreadsheet programs.
- Defragmentation: pieces of data in the HDD are not contiguous so it can be stored
in the HDD. When you defragment it, you sort the files into one contiguous block.
Organises read-write files into whole files once again.
- Specific: software written for application in specific fields. Accountancy
software (SAGE)
- Bespoke: custom-written software for a specific client.
Range:
- Word processors:
- Create written documents
- Write, manipulate, format, store text
- Allows printing/ sharing, entered from keyboard
- spell/grammar check
- Searchable thesaurus
- Spreadsheet:
- Financial data
- Write formulae to automatically update it
- Data arranged in rows and columns of a grid
- Manipulated and used in calculations
- Graphs and pivot
- Tables to analyse
- Database management system (DBMS):
- Creation and manipulation of databases
- Design, definition, creation + management database structures + content
- Different views of data providing security and program-data independence
- Multiple users
- Data duplications minimised
- Email clients:
- Sending emails
- Clients download info
- Write, send, receive and manage a user’s email
-
Different from a webmail client
-
Acts as a client in a client-server relationship with an email server
-
View and organise emails
-
Email clients can be standalone applications, web-based applications or
mobile applications.
- Web browser
- Loading web pages rendering HTML files
- Layout the contents
- Software for retrieved and presentation of web pages and associated
multimedia
- Loads and interprets HTML
- Retrieves information from other parts of the web
- Displays it on your desktop or mobile device
- Computer Aided Design (CAD)
- Don’t use brand names
- Creation, modification, analysis + optimisation of design of physical objects
- Produce output files for use by Camera machines
- Create designs both 2 and 3D to better visualise construction
- Engineers can make more accurate representations and modify them easily to
improve design quality.
- Graphic Processing Software
- Don’t use brand names
- Editing, manipulation and/or creation of visual images
- Manahes 2D images
- Logos, web graphics…
Binary Representation
Bit - smallest unit of data
Nibble - half a byte - 4 bits
Byte - 8 bits 255-256 possible values
128 64 32 16 8 4 2 1
00000010 = 2
00001010 = 10
00100000 = 32
00010101 = 21
1 = 0001
5 = 0000101
15 = 00001111
Negative numbers
-4 = 1100
-12 = 11110100 → YOU GET TOLD
Starting from the right leave all digits alone until you get to first 1. Change all other digits
from 0-1 or 1-0.
Or invert all and add 1.
Hexadecimal
Binary is not easy to read for humans. Hexadecimal base 16, shorthand notation for binary
number patterns. Binary numbers can be split into groups of four bits. Each base is worth 16
times its right hand neighbour.
1, 2, 3, 4, 5, 6, 7, 8, 9, A, B, C, D, E, F
1 10 11 100 101 110 111 1000 1001 1010 1011 1100 1101 1110 1111
27 = 00011011
0001 1011
3+8 = 11 → B 27 = 1B
10001010
1000 1010
8 and 10 = 8A
Data Types:
- Real: 3.14159
- Integer: 1
- String: “hello”
- Date: 12/34/28
- Time: 12:47:28
- Currency: $21.47
Graphics
Images can be created electronically, or captured by using a scanner or a digital camera.
Images can be stored in one of two main formats:
- Bitmap
- Vector
Bitmap
Produced by digital cameras, scanners + software packages. They are made up of a two
dimensional grid of pixels (picture elements), the smallest addressable picture element. Each
pixel is defined by a position in a bitmap and a colour.
Image resolution
Measure of a number of pixels you can store per unit of space; how densely packed they are.
The more packed they are the higher the resolution. Measured in PPI (pixel per square
inch).
The number of bits per pixel is referred to as the colour depth.
Vector graphics
Do not contain a map of pixels, instead they use polygons, using a line connected through
control nodes (points). You can see this using a vector graphics application.
A file contains a drawing list. Commands for each drawing aspect in the list. These
objects have properties, define relative size and shape of object, defined by groups of vectors-
vectors describe location of each point in each shape.
Advantage: resize without loss of quality. Only described in reference to the commas,
scaled up and down without the user seeing pixels.
Logic gates
- AND:
- If both A and B are true then AB is true.
A B A AND B
0 0 0
0 1 0
1 0 0
1 1 1
- OR:
- If A or B are true, then AB is true.
A B A OR B
0 0 0
0 1 1
1 0 1
1 1 1
- NOT:
- NOT is an inverter. It inverts the input value.
A B
0 1
1 0
- NAND:
- Negative AND
- If A and B are true, then AB is false, opposite of AND.
A B A NAND B
0 0 1
0 1 1
1 0 1
1 1 0
- NOR:
- Negative OR
- If A or B are true, then NOT A+B is false, opposite of OR.
A B A NOR B
0 0 1
0 1 0
1 0 0
1 1 0
- XOR:
- Exclusive or
- If A or B are true, then AB is true, BUT NOT BOTH.
A B A XOR B
0 0 0
0 1 1
1 0 1
1 1 0
TRUTH TABLE
A B C A AND B NOR C
0 0 0 0 1
0 0 1 0 0
0 1 0 0 1
0 1 1 0 0
1 0 0 0 1
1 0 1 0 0
1 1 0 1 0
1 1 1 1 0
CIRCUIT DIAGRAM
A
AND
B
NOR
C