0% found this document useful (0 votes)
39 views

Topic 2 - Computer Organisation IB Computer Science Notes

Brief notes on the IB Computer Science Topic 2: Computer Organisation

Uploaded by

xena.garcia
Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
39 views

Topic 2 - Computer Organisation IB Computer Science Notes

Brief notes on the IB Computer Science Topic 2: Computer Organisation

Uploaded by

xena.garcia
Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 14

Computer Organisation

Computer Architecture

- CPU:
- Fetch, decode and execute instructions from RAM
- Contains registers and control busses
- RAM:
- Random access memory
- Primary storage

ALL OF THIS IS ATTACHED TO THE MOTHERBOARD

- Von Neumann architecture: execute any kind of computation


- Harvard architecture: alternative

Inside CPU
Primary storage/ main memory/ memory
RAM and ROM
The wires that connect components together are known as buses.

ROM: holds data requires to start computer


Hard drive holds the operating system
RAM holds all programs and data you are using now volatile
ROM: read-only memory
Non-volatile
Holds software to start computer

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

They drain and don’t hold on to data for long.

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

Registers hold 32 or 64 bits, are short-term memory, fetch-decode-execute cycle.


The control unit handles all processor control signals. It directs all Input/output flow, fetches
code for instructions from microprograms and directs other units and models by providing
control and timing signals.
CIR or IR are instruction registers; they contain the current instruction that is being
executed.
Program Counter contains the address to the next instruction to be fetched. It is
incremented as soon as this next instruction is fetched to point once again to the next
instruction.
Arithmetic Logic Unit (ALU) is responsible for arithmetic and logical comparisons. It
will use the accumulator to temporarily store the result by the ALU.
Accumulator is a register used by the ALU to store short-term, intermediate arithmetic
and logic data.

Memory Address Register


Stores address of next instruction/data to be accessed from/to main memory RAM. It uses
the memory bus which is simplex. One way to RAM.

Memory Data Register


Used to store the actual instruction/data accessed from or sent to the RAM. The data bus is
duplex.
Buses:
- Data bus:
- Bi-directional
- Carries data to and from memory
- Carries data between I/O controllers and memory
- Address bus:
- Carries address to be read to or from memory
- One direction → from processor to memory
- Control bus:
- Control signals
- Makes sure everything is timed
- Bi-directional
- Transmits impulses generated by system clocks
- Wider buses:
- Faster transmission
- Same size as data copying over
- Processor gets data faster
- Faster processing
- Clock speed:
- Determines speed of processing
- Measured in cycles per second
- CPU’s have a recommended clock speed, going over it is called “overclocking”
- Running too fast can result in data corruption and overheating

Machine instruction cycle


fetch , decode and execute cycle

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

Secondary storage media

- Hard disk (HDD’s) → magnetic


- Floppy disks → magnetic
- Solid State Drives (SSD’s)
- Tapes: backup purpose
- USB drives (flash drives)
- SD card
- CD (compact disk) → optical storage
- DVD → optical storage

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

Main function of an operating system

- Provides UI (user interface): how you interact with computers.


- Main memory management: not override data already loaded in RAM.
- Hardware detection and peripheral management: peripheral external
devices.
- Security management: fingerprint, password
- Allows multitasking: lots of things in a computer to occur.
- Scheduling: decide whose turn it should be
- Time Slicing: how much time to each process

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

Computers use base 2: 0 or 1

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.

Hexadecimal 16 digits O-F

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

17 = 00010001 split in half


0001 0001
As they both equal 1
The number is 11
Therefore 17 = 11

27 = 00011011
0001 1011
3+8 = 11 → B 27 = 1B

10001010
1000 1010
8 and 10 = 8A

Character and Graphical Representation

Protocol: an agreed method of communication shared between different parties. This


ensures compatibility.
ASCII: character set 8-bit
Unicode: a character set made out of character sets.2 bytes (16 bits) up to 150 000
characters. For a bigger alphabet use a superset.

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.

Bitmap encoding Pixel representation Explanation

monochrome 1 bit 2 colours (black + white) 1


byte can store 8 pixels

16 colour 4 bits Byte stores 2 pixels 16


colours each pixel

256 colour 8 bits (1 byte) Byte stores 1 pixel 256


colours each pixel

24-bit colour 24 bits (3 bytes) “True colour” 16 million


(16,777,216) RGB system,
each byte holds value of red,
green and blue

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

ALWAYS DRAW SAME FOR ALL CIRCLE WITH NAME INSIDE

ALWAYS LIKE THIS NEVER ENGINEERING SHAPES


2) A AND B NOR C <—------ LOGIC STATEMENT

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

You might also like