Computer Functional Units: From Data to Action

Computer Functional Units divide a computer's work into identifiable jobs: accepting information, holding it, processing it, coordinating operations, and delivering results. You can use these jobs to trace a sensor reading through a controller or explain how a calculation reaches a display. The units cooperate; a useful result usually requires several of them.


Input, output, main memory, and secondary storage connect to a CPU containing a control unit, an ALU, and registers.


Identify each unit's job

A functional unit is a part of a computer identified by the task it performs. One physical chip can contain several functional units, so a functional diagram does not necessarily show separate devices.


The input unit accepts information from outside the computer. A keyboard interface, for example, receives keystrokes; a sensor interface receives measurements. The output unit communicates results to an external device, such as a display, printer, or actuator.


The arithmetic and logic unit, or ALU, performs operations on supplied operands. These include addition, subtraction, logical operations, and comparisons. A comparison can produce a condition flag, such as whether one value exceeds another, rather than a numerical result for display.


The control unit coordinates operations. It fetches and decodes instructions, selects the required ALU operation, and issues signals that direct transfers and register updates. In a simplified processor model, the central processing unit, or CPU, contains the control unit, ALU, and registers.



Distinguish holding data from moving data

A register is a small storage location within the CPU that holds information needed during processing. Depending on its purpose, a register can hold an operand, an intermediate result, an instruction, or an address.


Main memory holds instructions and working data that the processor accesses. Secondary storage retains programs and data for longer periods. The following distinctions describe a common computer with volatile RAM and nonvolatile secondary storage.


Location

Typical role

What happens when power is removed?

CPU registers

Hold active operands, addresses, and results

Contents are normally lost

Main memory using RAM

Hold running programs and working data

Contents are normally lost

Secondary storage, such as flash

Retain programs and saved data

Contents are retained


Connections carry information between units. A data connection carries values or instructions, an address identifies a location or destination, and control signals specify actions such as reading or writing. A bus is a shared communication path; actual computers can use several buses and other interconnections. The diagram groups these connections to emphasize their roles.


For an addition, the processor can load operands into registers, present them to the ALU, and capture the result in another register. Output occurs only when the result is transferred to an output interface. Producing an ALU result and saving that result are distinct events.

Account for the time each unit uses

When a stated model performs operations sequentially, with no overlap, add their elapsed times:


ttask=tinput+Nmemtmem+NALUtALU+toutputt_{\text{task}}=t_{\text{input}}+N_{\text{mem}}t_{\text{mem}}+N_{\text{ALU}}t_{\text{ALU}}+t_{\text{output}}


Here, NmemN_{\text{mem}} counts memory transfers and tmemt_{\text{mem}} is the time per transfer. Similarly, NALUN_{\text{ALU}} counts ALU operations and tALUt_{\text{ALU}} is the time per operation. All times must use matching units. Any instruction fetching or control activity must either be included in these supplied times or added separately.


For example, suppose input takes 0.50 ms0.50\ \text{ms}, two memory transfers each take 0.10 ms0.10\ \text{ms}, three ALU operations each take 0.05 ms0.05\ \text{ms}, and output takes 0.35 ms0.35\ \text{ms}. With control activity already included, the total is 0.50+2(0.10)+3(0.05)+0.35=1.20 ms0.50+2(0.10)+3(0.05)+0.35=1.20\ \text{ms}.



What to remember

  • Input receives information; output communicates results.
  • The ALU operates on data; the control unit coordinates actions.
  • Registers, main memory, and secondary storage serve different holding roles.
  • Add elapsed times only when the model specifies sequential operation without overlap.

Example: A Sensor Controller's Data Path

A controller receives a sensor reading of 1.80 V1.80\ \text{V}. It reads a correction of +0.20 V+0.20\ \text{V} and a threshold of 2.10 V2.10\ \text{V} from main memory. It adds the correction, compares the corrected value with the threshold, and sends an indicator command. The indicator turns on when the corrected value is greater than or equal to the threshold.


Use a simplified model with these timings:


Activity

Timing

Input reading into a CPU register

0.80 ms0.80\ \text{ms}

Reading each of the two stored values

0.12 ms0.12\ \text{ms} per memory transfer

Addition and comparison

0.03 ms0.03\ \text{ms} per ALU operation

Output command

0.50 ms0.50\ \text{ms}


All activities occur sequentially. The supplied times include instruction fetching, register updates, and associated control activity. There are no other delays.


A sequential controller cycle contains input, two memory transfers, two ALU operations, and output.


a) Find the corrected voltage and indicator state. Identify the roles of input, memory, registers, the ALU, the control unit, and output.


The input unit receives the sensor reading and places its numerical representation in a CPU register. Main memory supplies the correction and threshold, which are loaded into registers for processing.


The ALU first adds the correction:


Vcorrected=1.80 V+0.20 V=2.00 VV_{\text{corrected}}=1.80\ \text{V}+0.20\ \text{V}=2.00\ \text{V}


It then compares the corrected value with the threshold:


2.00 V<2.10 V2.00\ \text{V}<2.10\ \text{V}


The condition for turning on the indicator is false, so the output unit sends an off command. Registers hold operands and intermediate results during these operations. The control unit coordinates the memory reads, selects addition and comparison, and enables the required register updates and output transfer.


The corrected voltage is 2.00 V, and the indicator is off.


b) Calculate the elapsed time for one complete cycle.


Count both memory reads and both ALU operations. Because none of the activities overlap, their elapsed times add directly. Control activity is already included, so adding another control-time allowance would double-count it.


tmemory=2(0.12 ms)=0.24 mst_{\text{memory}}=2(0.12\ \text{ms})=0.24\ \text{ms}


tALU=2(0.03 ms)=0.06 mst_{\text{ALU}}=2(0.03\ \text{ms})=0.06\ \text{ms}


tcycle=0.80+0.24+0.06+0.50=1.60 ms\begin{aligned} t_{\text{cycle}}&=0.80+0.24+0.06+0.50\\ &=1.60\ \text{ms} \end{aligned}


One complete cycle takes 1.60 ms.


c) Calculate the total elapsed time for 250250 cycles performed consecutively with these same activity counts and timings. Give the result in seconds. Assume there is no delay between cycles.


Each cycle must finish before the next begins, and every cycle takes the same time. Multiply the number of cycles by the elapsed time per cycle, then convert milliseconds to seconds.


t250=250(1.60 ms)=400 ms=400 ms(1 s1000 ms)=0.400 s\begin{aligned} t_{250}&=250(1.60\ \text{ms})\\ &=400\ \text{ms}\\ &=400\ \text{ms}\left(\frac{1\ \text{s}}{1000\ \text{ms}}\right)\\ &=0.400\ \text{s} \end{aligned}


The total elapsed time is 0.400 s. This multiplication uses the stated absence of both overlap and delays between cycles.

A reservoir controller has already received a water-level measurement of 5.6 m5.6\ \text{m} and loaded a threshold of 6.0 m6.0\ \text{m}. Which functional unit performs the comparison that determines whether the measurement exceeds the threshold?

Choose an answer

Create a free account to get started

Unlock full course notes by signing up

  • Video lessons taught by top educators
  • Practice questions with guided solutions
  • Written review notes for reference
  • Expert answers anytime from course tutors

A greenhouse controller receives measurements, processes instructions, and sends commands to equipment. A functional unit is a component assigned a particular kind of task. Match each listed component to its principal responsibility within this controller.

Match each term
A.

Carries data, addresses, and commands between internal components.

B.

Sends processed commands from the computer to external equipment.

C.

Interprets instructions and issues signals that coordinate their execution.

D.

Accepts measurements from sensors and makes them available for processing.

Output unit

Input unit

Control unit

System interconnect

Create a free account to get started

Unlock full course notes by signing up

  • Video lessons taught by top educators
  • Practice questions with guided solutions
  • Written review notes for reference
  • Expert answers anytime from course tutors

A controller has a small bank of scalar CPU registers, volatile main memory (RAM), and nonvolatile flash storage. It needs three locations:

  • An active operand directly available to the ALU.
  • A large temporary measurement buffer, far larger than the register bank.
  • A saved calibration file that survives removal of power.

Which allocation best matches these purposes, in the order listed?

Choose an answer

Create a free account to get started

Unlock full course notes by signing up

  • Video lessons taught by top educators
  • Practice questions with guided solutions
  • Written review notes for reference
  • Expert answers anytime from course tutors

Extra Practice