Friday, February 12, 2010

How does the ALU and the control unit work together to process data?

The ALU (arithmetic-logic unit) has direct input and output access to the processor controller, main memory (RAM), and input/output devices.





Inputs and outputs flow along an electronic path that is called a bus. The input consists of an instruction word that contains an operation code, one or more operations, and sometimes a format code.





The operation code tells the ALU what operation to perform and the operands are used in the operation.


For example, two operands might be added together or compared logically.





The format may be combined with the op code and tells, for example, whether this is a fixed-point or a floating-point instruction. The output consists of a result that is placed in a storage register and settings that indicate whether the operation was performed successfully.





If it isn't, some sort of status will be stored in a permanent place that is sometimes called the machine status word.

No comments:

Post a Comment