Computer Science Notes: Computer Architecture & Fetch-Execute Cycle

Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 15

Computer Science

Notes
Chapter 3
Computer Architecture & Fetch-Execute Cycle
● Computer Architecture
○ Address bus – unidirectional
○ Data bus – bidirectional
○ Control bus – unidirectional and bi-directional

● Processor: The processor contains the Arithmetic and


Logic Unit (ALU)
● Control Unit: The control unit controls the operation of the
memory, processor and input/output devices
● The Fetch-Execute Cycle
1. PC contains address of the next instruction to be
fetched
2. This address is copied to the MAR via the address bus
3. The instruction of the address is copied into the MDR
temporarily
4. The instruction in the MDR is then placed in the CIR
5. The value in the PC is incremented by 1, pointing the
next instruction to be fetched
6. The instruction is finally decoded and then executed
Commented [1]: Definitions of all the terms (CIR, ACC
etc.)

❖ An OS is a software that connects the hardware in a manner


so that we can use it.
❖ A modern OS uses a GUI (Graphical User Interface)
➢ This is made of icons, buttons, and menus that can be
clicked to carry out tasks. It is an interactive type of
OS.
➢ Before GUI, CLI was there where the user would need
to type in the different commands they would like to
carry out.

➢ Its Main Functions-


■ Provides GUI to interact with computer.
■ It manages the hardware and peripherals
connected to the computer,
■ It manages the transfer of programs in and out of
the memory. It also manages how they will be
placed in the available memory.
■ It divides the processing time between different
applications that are running.
■ Manages Security, eg Anti Virus Software and
Firewalls, and also manages access rights.
■ Manages File Handling (Storage, Deletion and
Moving files) on a computer
■ Manages utility software such as disk
defragmentation and disk formatting software.

❖ An interrupt will cause the operating system on a


computer to stop and then the operating system will
need to work out what to do next.
❖ Operating system – The software running in
background of a computer system. It manages many of
the basic functions.
❖ Interrupt – An interrupt is a signal sent from a device
(or from somewhere) to processor requesting its
attention. The interrupt will cause the processor to
temporarily stop what it’s doing to serve the interrupt.

❖ Buffer – A buffer is temporary memory area in a


device. It allows the processor to carry on with other
tasks whilst.

❖ Buses ‐ They move data around the computer and also


end send out control signals to synchronize internal
operations.
❖ Types of Buses:
➢ Address Bus – This carries signals relating to the
address between the processor and memory; its
uni‐directional.
➢ Data Bus – This sends data between the
processor, memory unit and the input/output
devices; its bi‐directional.
➢ Control Bus – This carries signals relating to
control and coordination of all activates within
the computer; it can be unidirectional or
bidirectional due to internal connections.

❖ Registers – High‐speed storage areas within the


computer.

❖ Types of Registers:
➢ Memory Address Register (MAR)
➢ Memory Data Register (MDR)
➢ Arithmetic & Logic Unit (ALU)
➢ Program Counter (PC)
➢ Current Instruction Register (CIR) Commented [2]: Definitions of each.

❖ Memory Unit – Made up to address and contents.


Each address will uniquely identify each location
within the memory map.

❖ Control Unit – Controls the operation of the memory,


processor, and input/output devices; the control unit
reads instructions, interprets them and sends out
signals along the control bus to synchronize all
computer components.

❖ What is Fetch Execute Cycle?


➢ Fetch – The next instruction is fetched from the
memory address currently stores in program
counter (PC) and is then stores in Current
Instruction Register (CIR); The PC is then
incremented so that the next instruction can be
processed.
➢ Execute – The decoded instruction is the n passed
as a set of control signals to the appropriate
components of the computer system.
Chapter 4
❖ Logic Gates
Chapter 5
❖ What is an input device?
➢ An input device is a hardware or peripheral
device used to send data to a computer. An input
device allows users to communicate and feed
instructions and data to computers for processing,
display, storage and/or transmission.

❖ Hardwares are the physical components of a computer.

❖ Keyboard

➢ Has a set of keys to input data.

➢ Advantages
■ Simple to use
■ If trained to type fast, then very efficient
device.
➢ Disadvantages
■ Easy to make mistake
■ If not trained, then person can be very slow.
➢ A concept keyboard is generally a flat surface
with a grid of buttons on it. Each button is used to
do a different task. For Eg- ‘✓’ can be used to
order a burger, and ‘✕’ can be used to order a
pizza.
■ Used where functionality is limited. For eg -
Restaurant.
❖ Mouse
➢ Used to control pointer or a cursor on a screen.
➢ Types of mouses-

■ Ball Mouse/ Roller Ball Mouse


● Has a ball on the underside.
● Used in older days.
● Rolls against internal rollers in mouse
for functionality.
■ Laser Mouse

● Uses an optical laser that tracks the


movement of the mouse across a
surface to move the pointer in the
direction intended.

■ Trackball

● Used in same way as a mouse.
● Useful where desk space is limited.
● User rotates ball while the body part
stays still.
● Has buttons like a standard mouse.
● Often used in CAD (Mainly 3D
Design) for increased precision
(compared to a mouse).

■ Foot Mouse


■ Same as Trackball, but adapted for those
who have limited hand movement (or
differently-abled users)
➢ Advantages
■ Simple to use
■ Efficient

➢ Disadvantages
■ Needs a flat surface
■ Limited space can restrict the user
■ Dirt clogging can damage/ stop the mouse
from working.
❖ Scanners
➢ 2D Scanner


■ Used to scan a flat physical document (2D
such as paper), then convert it to a digital
format which can be used on a computer.
■ Works by shining light on the surface of the
document, after which the reflected light is
captured by a light-sensitive device using
mirrors and lenses.
■ 2D scanners can be used differently by
different softwares, which use the captured
image by the scanner-
● OCR (Optical Character Recognition
◆Text is converted to a text file, by
an OCR software, so that it can be
edited.

● OMR (Optical Mark Recognition)


◆The OMR software notes where
marks have been made on the
OMR sheet (like above image).
■ Advantages
● High Quality
● Can be edited
● Digital Document could be attached to
emails.
■ Disadvantages
● Use a lot of memory space.
● High quality, but not as good as
original.
● If quality of document is bad, then the
scanned image’s will be worse.

➢ 3D Scanner


■ Used to produce a 3D model of a 3D object
■ Scans a 3D object by using a laser or a light
source. It measures and inputs the geometry
of an object in the computer and create a
model of it.
■ The created model when used with a 3D
printer, could be replicated as a physical
model.
■ They are nowadays used as security measure
in airports.

■ 3D scanners are nowadays used as


Biometric Devices-
● Used to identify a person’s physical
features such as retina, fingerprint or
face.
● After scanning the biological features,
the biometric device looks for a match
in the computer’s memory.
➢ Barcodes

You might also like