Hardware and software Flashcards
Logic Gates
OR )> AND |) NOT |>º NOR )>º NAND |)º XOR ) )>
Truth Tables
Truth tables are compiled in numerical order
OR: A OFF , B OFF = 0 A OFF , B ON = 1 A ON , B OFF = 1 A ON , B ON = 1
AND: A OFF , B OFF = 0 A OFF , B ON = 0 A ON , B OFF = 0 A ON , B ON = 1
NOT:
A OFF = 1
A ON = 0
NOR: A OFF , B OFF = 1 A OFF , B ON = 0 A ON , B OFF = 0 A ON , B ON = 0
NAND: A OFF , B OFF = 1 A OFF , B ON = 1 A ON , B OFF = 1 A ON , B ON = 0
XOR: A OFF , B OFF = 0 A OFF , B ON = 1 A ON , B OFF = 1 A ON , B ON = 0
Logic Statements
Writing a logic statement, steps:
- X (or other) =
- final logic gate in the middle
- brackets on either side of gate in the middle
- logic gate in middle of either bracket for both sides and continue working backwards
Logic circuits
From information or logic statement, work from middle gate and place last and continue working from middle till done.
Computer Architecture
Stored program concept (Von Neumann Architecture)
- single processor in computer system
- processor uses sequential fetch-execute cycle
- data (files) and instructions (software) both stored in same memory (RAM)
Prior to this if a computer wanted to carry out another task it would have to be physically rewired
Processor Cycle
Main stages of the processor’s cycle
- Fetch - the instruction
- Decode - the instruction
- Execute - the instruction
Parts of a processor
Memory Unit:
- temporary storage areas for data and instructions
- inside the processor (not within RAM)
Arithmetic-Logic Unit (ALU):
- carries out mathematical equations on data
- evaluates relational comparisons
- inside the ALU is a general-purpose register called the accumulator (data needs to be placed in the accumulator for calculations to be carried out by the ALU)
Control unit:
- co-ordinates what and where data goes when it enters or leaves the processor
- it also controls the interactions between the different parts of the processor (e.g. the registers)
IAS/Immediate Access Memory (Cache memory):
A processor also has built-in cache memory. This is super-fast memory (much faster than RAM) that is stored within the processor.
Parts of Processor (Image structure)
Processor image (3 images)
Refer to IG Computer Science OneNote for answer
OneNote > Content Library > Unit 3 > Parts of a Processor
What is a register
A temporary memory location within the processor.
Registers store data and instructions whilst they are being processed.
Registers are also used to move data and instructions into and around the different parts of the CPU.
Special types of Registers
MAR - memory address register
Contains the location in RAM of the current instruction being processed
MDR - memory data register
Contains the contents (values, instruction) returned from RAM
CIR - current instruction register
Contains a copy of the contents of the MDR
Responsible for decoding the instruction
PC - program counter The location (memory address) in RAM of the next instruction to be fetched
General Purpose Register
ACC (accumulator) - stored in ALU
Keeps track of data that needs to be accessed over a period of time during processing
Buses
Buses are wires used to transmit data within the processor and on the motherboard.
Three types of buses:
Address bus
- used by PC and MAR to transmit locations in RAM (i.e. addresses)
Control bus
- used by the PC and the MDR to send instructions
Data Bus
- used to carry data between RAM and the MDR, and between the MDR and the CIR
Stages in the fetch-execute cycle
Fetch execute cycle steps
- PC has address of next instruction
- PC copied to the MAR
- Lookup MAR and get contents. Copy contents into the MDR
- Copy MDR contents into the CIR
- PC is then incremented by 1
- The instruction is decoded and then executed
- Repeat
Input devices - 2D scanners
How a 2D scanner works:
How a (_____) works:
OCR:
An input device digitised by a scanning device such as flatbed or barcode scanner.
How a 2D scanner works:
- Scanner shines a light beam onto document.
- Scanner detects level of reflected light from positions on the document.
- Light intensity is converted by software for each pixel position into a combination of 0s and 1s by sensing different intensities of light and dark from the document.
How a flatbed works:
- Place document - raise cover, put document on panel and close
- Very bright light - (xenon lamp)
- Scan head - moves across the document and image is created and sent to a lens using mirrors
- Charge Couple Device - focused image falls on CDD, IC’s etched into silicon and software produces digital image
OCR Optical character recognition: OCR alongside 2D scanner used in airport for passport to face identification eg. Distance between the eyes Width of the nose Shape of the cheek bones Length of the jaw line Shape of the eyebrows
Input devices - Linear Barcodes
Linear Barcodes are 1D and the most commonly used
Steps:
- Infra-red laser light shines onto linear barcode.
- Light reflected back into the moving mirrors/prism
- The barcode reader’s charge-coupled device (CCD) measures the amount of reflected light input.
- Light measurement is converted into an electrical charge (1 or 0).
- Data from the bar code is sent to the computer’s processor in binary form.
Input devices - QR Codes
Quick response codes are faster to read and have a greater storage capacity than UPC linear barcodes.
Scanned digitally by phone’s image sensor then interpreted by microprocessor.
Input devices - Keyboards
Keyboard works using plungers at the bottom of each key which when pressed pushes 2 electrical contains completing a circuit (key matrix).
Key matrix (circuits) stored in ROM
Input devices - Mouses
Trackerball Mouse:
- Similar to the concept of the original mouse but upside down. The movement of the ball in the socket contains sensors. The data from the sensors processed by a software determines the movement of the pointer.
Optical Mouse:
- A red LED bounces light off the surface onto a CMOS sensor which sends each image to the DSP for processing. The DSP detects if the mouse has moved, at what distance and at what speed.
Input devices - Microphones
All microphones need to input a varying pressure wave and then convert this to an electrical reading.
- Sound vibration hits a diaphragm.
- Movement of the diaphragm causes a coil to move.
- Movement of the coil induces a current through the electromagnetic effect.
- The electrical current is digitised (ADC - analogue-digital converter)
- The digital content is played back using software.
Sensors - Light, Temperature, Pressure, Motion, Gas, pH, thermal, moisture, humidity
Light:
Light Sensors are photoelectric devices that convert light energy (photons) into an electrical (electrons) signal
eg. barcode scanner, automatic lights as it gets dark
Temperature:
A temperature sensor is a device, typically, a thermocouple or RTD, that provides for temperature measurement through an electrical signal.
eg. thermometer
Pressure:
A Pressure sensor measures the amount of force exerted.
eg. old-style electric doors, pressure inside gas canisters
Primary/Main Memory/Storage
All computers must use Primary storage and it is directly accessible by the processor because it is connected directly to the motherboard.
- RAM random access memory
RAM is volatile and directly connected to the CPU.
RAM
RAM stores data and instructions that are currently open and running. If a file or program is not open, it will not be in RAM.
RAM contains parts of the operating system that are currently in use. Contents stored in RAM are directly accessible to the processor. When you load a stored file it is first loaded into RAM before any changes made to the file are processed by the CPU.
RAM is volatile so when power to the computer system is lost so are the contents of RAM.
Storage capacity is in GB and has read and write ability.
Its contents change every time we use a computer.
ROM
ROM stores your computer system’s BIOS and bootstrap loader.
Basic Input Output System (BIOS)
Most do not need to access the BIOS on a regular basis, if at all. The BIOS allows us to change things like the bootable drive.
Bootstrap loader
When you first turn on (‘boot’) your computer, the operating system has not yet loaded.
Your computer performs a self check of its hardware. It makes sure that it recognises it has RAM and a bootable drive of some sort.
ROM is non-volatile memory between 4-8 MB storage
Secondary Memory/Storage
Types
Use in a laptop or computer
What it is
Magnetic/Solid state/ off-line
A laptop or desk top computer either has an (HDD) or an (SSD) as its main secondary memory/storage device.
Secondary storage devices are not directly accessed via the processor. Their contents are first be loaded into RAM before being transferred to the CPU for processing.
How HDDs work
An HDD platter is magnetic
the film stores data (bits)
bits are written to using the magnetic read/write head
the positive or negative charge (polarity) is different for a 1 and 0
SSD
SSDs are non-volatile storage devices No moving parts Uses flashing light to store data on chips Solid state external device Large storage capacity
HDD vs SSD
HDD:
- cheaper
- longer lifespan
- larger storage capacity
SDD:
- uses less power
- skinny compact
- no delay when reading or writing data
- less heat produced
- quieter
- more durable (harder to break)
Secondary storage device Types and examples
Magnetic:
- Magnetic tape
- Floppy discs/drives
- HDD
Optical:
- CDs
- DVDs
- Blu-ray
- DVD-RAM
Solid state:
- SSDs
- USB Flash memory/memory sticks
- SD cards
Offline storage
Types and examples
Offline storage is external to the computer system and can be taken away from the computer.
Magnetic:
- external HDD
Optical:
- CD
- DVD
- Blu-ray
Solid state:
- external SSD
- memory stick (not USB on it’s own)
- SD cards
How a CD works
Data is stored on the CD on a single spiral track in pits (0s) and lands (1s).
The CD drive spins the CD at a constant speed.
A red laser shines on the CD’s surface.
Light is reflected from the disc from the pits and lands, which is how binary data is read from the CD.
Primary storage vs. Secondary Storage
Types
Volatility
Contents
Placement
Read/Write access speeds
Relationship to CPU
Primary Storage:
RAM - volatile, ROM - non-volatile
RAM - currently running programs and files, ROM - BIOS and bootstrap loader (start-up instructions)
Internal placement
RAM - plugged onto motherboard
ROM - soldered onto motherboard
Faster than secondary storage
Directly accessible by the processor (CPU)
Data and instructions must be in RAM before being sent to the CPU for processing
CPU loads the operating system when the bootstrap loader in ROM runs when the computer is turned on
Secondary Storage:
HDD, SSD
Both are non-volatile
Both - stores files and programs for long-term storage
Internal and external options
Inside computer case, attached to motherboard via cable
Portable HDD or SSD, connected via USB port
Slower than primary storage
Contents are not directly accessible by the processor (CPU)
Data and instructions on HDD and SSD (internal and external) is loaded into RAM first
Blu-ray vs. DVD
DVD red laser
Blu-ray blue laser and more storage
DVD vs. DVD-RAM
DVD read only and one spiral track
DVD-RAM read and write (at same time too) and multiple concentric tracks
Flash memory vs. CD-RWs
Type of offline storage media
How data is read/written
Read/write access speed
Hardware
Flash memory:
solid state
transistors/logic gates
faster than CD-RW because no moving parts
plugs directly into computer via USB port
CD-RW: optical red laser slower than flash memory requires a separate CD drive to read or write data
Output devices - Inkjet printer
They operate by heating the ink as it flows through a set of tiny nozzles. The heating process causes a small droplet of ink to form. This is then released as a single dot which forms part of a letter or image.
Either thermal uses heating element to make air bubble
or piezoelectric crystal to vibrate
adv. Cheap, compact, faster than dot matrix, quiet
disadv. colour is slow, wet ink can smudge
Output devices - Laser printer
Laser printers used the same technology as photocopiers.
(Image refer to laser printer image in OneNote)
- Laser beam and rotating mirror used to draw image of page on drum.
- Image converted on drum into electrostatic charge, this attracts and holds toner.
- Charged paper rolls against the drum.
- Charge pulls the toner away from drum and onto paper.
- Heat fuses the toner to the paper.
- The electrical charge is removed from the drum and the excess toner is collected.
NB - for multiple colours, multiple drums
Output devices - Dot matrix printer
Comparatively noisy and low quality but cheap to run and used when carbon copies or duplicates are needed. Useful in dirty environments such as a garage because they are very sturdy.