Free Trial

Safari Books Online is a digital library providing on-demand subscription access to thousands of learning resources.

Share this Page URL

Chapter 6. How Microcomputers Work > Operational Details - Pg. 129

Chapter | 6 How Microcomputers Work 129 OPERATIONAL DETAILS Registers and the ALU The main circuit element in a CPU is the register. Usually the data to be pro- cessed by the CPU is taken from memory and stored temporarily in a register. Like a memory location, a register usually has a fixed length such as 8, 16, or 32 bits. But unlike a memory location, registers are often used to manipulate data as well as store it. That is, the register can alter or process the data in some way. Examples of how a register can process data are shown in Figure 6.5 . A binary word in a register can be shifted one or more bit positions to the right or left, or the register may be connected as an up/down counter so that it can be incremented (add one to the content) or decremented (subtract one from the content). A register can also be reset or cleared, thereby erasing any data in it and leaving the content zero. Data transfers and manipulations performed on a register are initiated by individual computer instructions. For example, one instruction may cause the register to be loaded from a memory location. Another instruction may cause the word in the register to be transferred to a memory location. All data trans- fers are parallel, meaning that all bits are moved simultaneously from the