Control Unit (CU) and How It Works

Source: freepik
Definition of Control Unit (CU):

Control Unit  is  the main part of the CPU (Central Processing Unit) which gives rules or controls the control commands in the ALU section.

The control unit performs 2 basic tasks, namely:
         -   Ordering
         -   Execution 

How the Control Unit (CU) works:
in ALU there are 2 types of input, for example with input A and input B which are considered two numbers from some previous input. The two inputs are then added simultaneously. CU obtained information from RAN and was told to ALU what kind of operation would be carried out on the input, The ALU will issue the operation as an answer depending on the type of instruction, the actual ALU output can be ignored for example if we choose division or comparison instructions, the ALU does not need to issue an answer but the ALU only needs to tell CU how the 2 numbers compare with each other. For this problem the ALU uses a flag to help the control unit to decide when to send the next instruction. To produce output then when 8 cables come out of the ALU it runs again to the register (a temporary data storage area that is inside the processor). When the ALU provides input to the actual register the output will not be saved before the control unit activates the micro set register cable. Each micro cable set is on, The register will store all the input cables and at the same time we also have the output stored in the register. How to get good output when the process of moving output out of the register requires other controls such as micro enable cables that connect the control unit to the register. After CU activates the micro cable enable at the register this process will display the whole number stored in the output register and then connected to the BUS processor (a group of micro cables that connect components into components in the computer).

Inside the BUS there is a register with a micro cable set and a separate enable cable which stores the number from the previous instruction. Then CU will activate certain cables aimed at storing numbers in the register, then CU will empty the BUS. The above register is used to store numbers between operations that have a micro output cable that goes back to the BUS. The process means that the number has been moved from one register to another by only activating and deactivating a number of micro wires which is one of the advantages of the BUS, which is easily moving numbers between components while the disadvantage is that the bus only has 1 number active at a time.

Within its limitations, the  ALU only has a temporary register, namely at input B when CU is involving the ALU by moving one of the inputs to the temporary register and Temporary registers do not need to enable micro cable enable because it is only output to the ALU in order to avoid conflicts with other registers. Other inputs from ALU will come directly to the BUS. CU will activate another register and the number in the register will become the ALU input and become the input A. The number will remain on the BUS until the instruction process, the result will have 2 ALU inputs, the CU also knows what operation the ALU will deliver to conduct instructions from RAM which is called the instruction register. Micro cable input in BUS will not affect the register since the instructions have been stored in the next step. This register is a temporary register and does not need to enable micro cables to enable output to the control unit. Based on this instruction, CU will notify the type of input to the ALU the type of input to be performed. For example, the instructions used are comparative instructions but are not interested in the output numbers in the ALU, you need to know that the two inputs are compared with each of the other inputs, then flags are used. 

Each flags are only in the form  of micro cables that always switch on and off depending on the right or wrong conditions. Inside the processor itself there are 4 flags. A is a bigger flag and will light up if input A is greater than input B. If the input is the same then input B then both flags will light up, and if both light up means OR ie input B is greater than input A but there is a second case input ON means that both inputs are the same. After the comparison instruction is finished we need flags for the next instruction so it will be stored in a register which only has 4 inputs and outputs for each flags.

1 flags set into register flags, the processor is finished with comparative instructions and can request further instructions from RAM. In addition to the comparative instructions there is also a jump if instruction. the combination of comparison instructions with jump if is very commonly used in programming when there is more than 1 path through the program. The computer uses this instruction to determine which path to go. Completed in the comparison flags instructions will be stored in the flags register and need to notify RAM in the process of preparing for the next data section, so in the processor there is another very important register called the address register. The processor uses this register to find out where the next register must come from RAM.

CU then activates  the micro enale RAM cable and the RAM will automatically send data to that address (instructions). The instructions are then stored in the instruction register and the CU starts processing the jump if equal instructions which check whether the flag is active, the instruction will run one of the micro and the same cable to the AND gate. If both AND gates are active at that time the micro output cable will also light up and trigger a jump that will take the next piece of data to the RAM that is the address and transferred to the address instruction. When the instruction is finished the processor then processes the instructions to the new address and will add 4 final micro cables to the processor used to control external devices such as monitors and keyboards. All data 

which moves to the processor using the BUS and is stored in each register according to how the data will be used. Monitor in processing tens or billions of instructions per-second. That the phenomenal speed of a processor is achieved by using more than 1 component and ensuring that the component is active as much as possible. On the chip there is a RAM set cable and a micro cable enable RAM which at the top is a micro cable RAM address and at the bottom is a micro data cable that runs on RAM and external devices then the left part is a micro input or output control cable.

0 Response to "Control Unit (CU) and How It Works"

Post a Comment

Iklan Atas Artikel

Iklan Tengah Artikel 1

Iklan Tengah Artikel 2

Iklan Bawah Artikel