Skip to content
Book 5: Computer Systems

Book 5 · Chapter 6

Automated and emerging technologies

§6.1§6.2§6.3Core · ≈ 11.1 m · →B5·6

This 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.

Open in the ebook

For the whole chapter

§6.1 Automated systems

Short code B5·6·1

§6.2 Robotics

Short code B5·6·2

§6.3 Artificial intelligence

Short code B5·6·3

What is an automated system?

Short code B5·6·10

Practice for this page of the book: the quiz, flashcards and past-paper questions for its section are listed above.

How the three parts work together

Short code B5·6·11

DECLARE Reading : REAL
DECLARE Check : INTEGER
FOR Check ← 1 TO 6
    INPUT Reading
    IF Reading < 37.5
      THEN
        OUTPUT Reading, " heater ON"
      ELSE
        OUTPUT Reading, " heater OFF"
    ENDIF
    IF Reading > 38.5
      THEN
        OUTPUT "ALARM: too hot"
    ENDIF
NEXT Check
The incubator's control loop, stopped after six readings so you can trace it. Notice that the sensor only supplies Reading: every decision is an IF in the microprocessor's program. Lines beginning › are the sensor readings.

Output

› 36.8
36.8 heater ON
› 37.2
37.2 heater ON
› 37.6
37.6 heater OFF
› 38.9
38.9 heater OFF
ALARM: too hot
› 37.5
37.5 heater OFF
› 37.4
37.4 heater ON
Run and checked before printing
for check in range(6):
    reading = float(input())
    if reading < 37.5:
        print(reading, "heater ON")
    else:
        print(reading, "heater OFF")
    if reading > 38.5:
        print("ALARM: too hot")
The same control loop in Python, with the same six readings typed in. The decisions are identical: compare the reading with the stored values, then switch the heater or sound the alarm.

Output

36.8 heater ON
37.2 heater ON
37.6 heater OFF
38.9 heater OFF
ALARM: too hot
37.5 heater OFF
37.4 heater ON
Run and checked before printing

Explaining an automated system in the exam

Short code B5·6·12

Practice for this page of the book: the quiz, flashcards and past-paper questions for its section are listed above.

Automated systems in seven settings

Short code B5·6·13

Practice for this page of the book: the quiz, flashcards and past-paper questions for its section are listed above.

Weighing up an automated system

Short code B5·6·14

Practice for this page of the book: the quiz, flashcards and past-paper questions for its section are listed above.

Robotics and robots

Short code B5·6·15

Practice for this page of the book: the quiz, flashcards and past-paper questions for its section are listed above.

What robots do, and the case for and against

Short code B5·6·16

Practice for this page of the book: the quiz, flashcards and past-paper questions for its section are listed above.

What is artificial intelligence?

Short code B5·6·17

Practice for this page of the book: the quiz, flashcards and past-paper questions for its section are listed above.

Expert systems

Short code B5·6·18

Practice for this page of the book: the quiz, flashcards and past-paper questions for its section are listed above.

Machine learning

Short code B5·6·19

DECLARE Setting : REAL
DECLARE Choice : REAL
DECLARE Day : INTEGER
Setting ← 20
FOR Day ← 1 TO 4
    INPUT Choice
    Setting ← (Setting + Choice) / 2
    OUTPUT "Day ", Day, ": new setting ", Setting
NEXT Day
A toy version of learning: each day the family turns the thermostat to the temperature they want (›), and the program moves its own stored Setting halfway towards that choice. Nobody rewrote the program. It changed its own data from experience.

Output

› 22
Day 1: new setting 21
› 22
Day 2: new setting 21.5
› 22
Day 3: new setting 21.75
› 21
Day 4: new setting 21.375
Run and checked before printing

Workbook: Automated and emerging technologies

Short code W5·6 · Computer Systems 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.

Ask Z about Automated and emerging technologies
Buy ZAK's books — WhatsApp the books desk: Buy the booksPrint or ebook