Book 1 · Chapter 3
Hardware
B1·3This chapter is in the ebook.
Read it in full on cswithzak.com. Every question has its mark scheme and every program is ready to run. The free practice for each section is below, with the short code the book prints beside it.
For the whole chapter
- Topic pageHardware
B1·3·T - QuizHardware & Logic Gates
B1·3·Q1 - LabLogic Gates Lab
B1·3·X1 - LabCircuit → truth table practice
B1·3·X2 - LabControl system simulator
B1·3·X3
§3.1 Computers and their components · Memory types · Monitoring and control systems
Short code B1·3·1
- FlashcardsFlashcards §3.1: Devices, storage principles & buffers
B1·3·F1 - Past-paper questionsPast-paper questions §3.1 (computers-and-their-components)
- Past-paper questionsPast-paper questions §3.1 (memory-types)
- Past-paper questionsPast-paper questions §3.1 (monitoring-and-control-systems)
§3.2 Logic gates and logic circuits
Short code B1·3·2
- FlashcardsFlashcards §3.2: Logic gates & logic circuits
B1·3·F2 - Past-paper questionsPast-paper questions §3.2 (logic-gates-and-logic-circuits)
B1·3·2
Input, output, memory and storage
Short code B1·3·10
Practice for this page of the book: the quiz, flashcards and past-paper questions for its section are listed above.
Embedded systems
Short code B1·3·11
Practice for this page of the book: the quiz, flashcards and past-paper questions for its section are listed above.
Printing: laser and 3D printers
Short code B1·3·12
Practice for this page of the book: the quiz, flashcards and past-paper questions for its section are listed above.
Sound in and out: microphone and speaker
Short code B1·3·13
Practice for this page of the book: the quiz, flashcards and past-paper questions for its section are listed above.
Touchscreens and virtual reality headsets
Short code B1·3·14
Practice for this page of the book: the quiz, flashcards and past-paper questions for its section are listed above.
Storage devices: magnetic, flash and optical
Short code B1·3·15
Practice for this page of the book: the quiz, flashcards and past-paper questions for its section are listed above.
Buffers
Short code B1·3·16
Practice for this page of the book: the quiz, flashcards and past-paper questions for its section are listed above.
RAM and ROM
Short code B1·3·17
Practice for this page of the book: the quiz, flashcards and past-paper questions for its section are listed above.
SRAM and DRAM
Short code B1·3·18
Practice for this page of the book: the quiz, flashcards and past-paper questions for its section are listed above.
Monitoring and control systems
Short code B1·3·19
DECLARE Temp : REAL
DECLARE HeaterOn : BOOLEAN
DECLARE Minute : INTEGER
Temp ← 17.0
HeaterOn ← FALSE
FOR Minute ← 1 TO 10
IF Temp < 18.0 THEN
HeaterOn ← TRUE
ENDIF
IF Temp > 24.0 THEN
HeaterOn ← FALSE
ENDIF
OUTPUT Minute, " ", Temp, " ", HeaterOn
IF HeaterOn = TRUE THEN
Temp ← Temp + 2.0
ELSE
Temp ← Temp - 1.5
ENDIF
NEXT MinuteOutput
1 17 TRUE 2 19 TRUE 3 21 TRUE 4 23 TRUE 5 25 FALSE 6 23.5 FALSE 7 22 FALSE 8 20.5 FALSE 9 19 FALSE 10 17.5 TRUE
The six logic gates
Short code B1·3·20
def NOT(a): return 1 - a
def AND(a, b): return a & b
def OR(a, b): return a | b
def NAND(a, b): return NOT(AND(a, b))
def NOR(a, b): return NOT(OR(a, b))
def XOR(a, b): return a ^ b
print("A B | NOT_A AND OR NAND NOR XOR")
for A in (0, 1):
for B in (0, 1):
print(A, B, "|", NOT(A), AND(A, B), OR(A, B), NAND(A, B), NOR(A, B), XOR(A, B))Output · 4 rows
| A B | NOT_A AND OR NAND NOR XOR |
|---|---|
| 0 0 | 1 0 0 1 1 0 |
| 0 1 | 1 0 1 1 0 1 |
| 1 0 | 0 0 1 1 0 1 |
| 1 1 | 0 1 1 0 0 0 |
From expression to circuit
Short code B1·3·21
Practice for this page of the book: the quiz, flashcards and past-paper questions for its section are listed above.
From circuit to expression and truth table
Short code B1·3·22
def NOT(a): return 1 - a
def AND(a, b): return a & b
def OR(a, b): return a | b
def NAND(a, b): return NOT(AND(a, b))
def NOR(a, b): return NOT(OR(a, b))
def XOR(a, b): return a ^ b
print('A B C P Q X')
for A in (0, 1):
for B in (0, 1):
for C in (0, 1):
P = NAND(A, B)
Q = XOR(B, C)
X = AND(NAND(A, B), XOR(B, C))
print(A, B, C, P, Q, X)From a problem statement
Short code B1·3·23
Practice for this page of the book: the quiz, flashcards and past-paper questions for its section are listed above.
From a truth table to an expression
Short code B1·3·24
def NOT(a): return 1 - a
def AND(a, b): return a & b
def OR(a, b): return a | b
def NAND(a, b): return NOT(AND(a, b))
def NOR(a, b): return NOT(OR(a, b))
def XOR(a, b): return a ^ b
print("Rows where X = 1:")
for A in (0, 1):
for B in (0, 1):
for C in (0, 1):
X = OR(OR(AND(AND(NOT(A), NOT(B)), C), AND(AND(NOT(A), B), C)),
AND(AND(A, B), NOT(C)))
if X == 1:
print(A, B, C)Output
Rows where X = 1: 0 0 1 0 1 1 1 1 0
Workbook 1: Hardware
Short code W1·3 · Theory Fundamentals Workbook
The write-in workbook for this chapter has drills, exam-style practice, trace tables, fix-the-mistake and mark-it-yourself pages. Its full mark schemes and an interactive version arrive here with the chapter.


