pbaumgarten.com

Unit 4 Hardware and software

Computer architecture and the fetch-execute cycle (1.3.2)

“A computer processor does moronically simple things — it moves a byte from memory to register, adds a byte to another byte, moves the result back to memory. The only reason anything substantial gets completed is that these operations occur very quickly. To quote Robert Noyce, ‘After you become reconciled to the nanosecond, computer operations are conceptually fairly simple.’” *

Input devices (1.3.3)

GPIO

describe the principles of operation (how each device works) of these input devices

# Create a QR code
# pip install pyqrcode pypng
# pyqrcode library @ https://github.com/mnooner256/pyqrcode
import pyqrcode
qr = pyqrcode.create('https://pbaumgarten.com/')
qr.png("cool website.png", scale=5)
# Decode a QR code
# Install zbar as per https://github.com/NaturalHistoryMuseum/pyzbar/#installation
# pip install zbar Pillow ImageToolsMadeEasy
from pyzbar.pyzbar import decode
from PIL import Image
import ImageTools

camera = ImageTools.Camera()
while True:
    input("Press ENTER to take a photo")
    img = camera.take_photo()
    img.show()
    barcodes = decode(img)
    if len(barcodes) > 0:
        print("The following barcodes or qrcodes were found...")
        for i in range(len(barcodes)):
            print(barcodes[i].data.decode())
    else:
        print("No barcode or qrcode")

describe how these principles are applied to real-life scenarios, for example:

describe how a range of sensors can be used to input data into a computer system, including:

describe how these sensors are used in real-life scenarios, for example:

Output devices (1.3.4)

describe the principles of operation of the following output devices:

describe how these principles are applied to real-life scenarios, for example:

Memory, storage devices and media (1.3.5)

High and low-level languages and their translators (1.3.7)

Operating systems (1.3.6)

purpose; need for interrupts

Data Storage (1.1.3)

Candidates should be able to: • show understanding that sound (music), pictures, video, text and numbers are stored in different formats • identify and describe methods of error detection and correction, such as parity checks, check digits, checksums and Automatic Repeat reQuests (ARQ) • show understanding of the concept of Musical Instrument Digital Interface (MIDI) files, JPEG files, MP3 and MP4 files • show understanding of the principles of data compression (lossless and lossy) applied to music/video, photos and text files

Different storage formats

Error detection and correction

Some common file formats

Compression

How Computers Compress Text: Huffman Coding and Huffman Trees - Tom Scott (6:30)