0% found this document useful (0 votes)
28 views

Practice Question 1 Topic: Monitoring and Control System / Bit Manipulation

The farmer installed equipment to monitor and record the greenhouse temperature hourly during the growing season. This is a monitoring and control system. The equipment would need a temperature sensor, data storage, and a way to record the temperature data hourly. Each temperature recording is stored as two successive bytes - byte 1 indicates the sensor location by setting one of the 7 bits, and byte 2 contains the temperature reading in two's complement format.

Uploaded by

JAWAD SALEEM
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
28 views

Practice Question 1 Topic: Monitoring and Control System / Bit Manipulation

The farmer installed equipment to monitor and record the greenhouse temperature hourly during the growing season. This is a monitoring and control system. The equipment would need a temperature sensor, data storage, and a way to record the temperature data hourly. Each temperature recording is stored as two successive bytes - byte 1 indicates the sensor location by setting one of the 7 bits, and byte 2 contains the temperature reading in two's complement format.

Uploaded by

JAWAD SALEEM
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 2

Practice Question 1 Topic: Monitoring and control system / Bit manipulation

A farmer grows vegetables in a greenhouse. For the vegetables to grow well, the temperature needs to
always be within a particular range.

The farmer is not sure about the actual temperatures in the greenhouse during the growing season. The
farmer installs some equipment. This records the temperature every hour during the growing season.

(a) Name the type of system described.

...............................................................................................................................................[1]

(b) Identify three items of hardware that would be needed to acquire and record the temperature data.
Justify your choice for each.

Item 1 ........................................................................................................................................

Justification ...............................................................................................................................

...................................................................................................................................................

Item 2 ........................................................................................................................................

Justification ...............................................................................................................................

...................................................................................................................................................

Item 3 ........................................................................................................................................

Justification ................................................................................................................................

...............................................................................................................................................[6]

(c) The equipment records temperatures in the greenhouse. It does this for seven locations.

Each recording is stored as two successive bytes. The format is shown below:

The location is indicated by the setting of one of the seven bits in byte 1. For example, location 4 is
indicated by setting bit 4.
Bit 0 of byte 1 acts as a flag:

• the initial value is zero

• when the reading has been processed it is set to 1

Byte 2 contains the temperature reading (two’s complement integer).

(i) Interpret the data in byte 1 shown below:

(ii) The system receives a temperature reading of –5 degrees from sensor 6.

Complete the boxes below to show the two bytes for this recording. The reading has not yet been
processed.

(d) (i) The accumulator is loaded with the value of byte 1 from location 106.

Write the assembly language instruction to check whether the reading in byte 2 came from location 4.

LDD 106 // data loaded from address 106

................................................................................................................................................................[4]

(ii) Write the assembly language instruction to set the flag (bit 0) of the byte contained in the
accumulator to 1.

......................................................................................................................................................................

You might also like