Control Unit: Features & Working

Jasmine Grover logo

Jasmine Grover

Education Journalist | Study Abroad Lead

The Control Unit is an integral component of the control processing unit (CPU) which interprets and directs instructions of operations from the main memory. 

  • It is a circuitry that serves as an intermediary between the processor (CPU) and output devices. 
  • The control unit regulates the flow of data between CPU and other parts of the computer system. 
  • In essence, the control unit plays a substantial role in efficient working of the computer system.
  • Control unit is a vital part of the processor which administers the route of operations and guides the other components of the CPU on how to react to commands given.

Key Terms: CPU, Control Unit, Processor, Memory, ALU


Control Unit in Computer Architecture 

[Click Here for Sample Questions]

The control unit was first introduced in the von nuemann's architecture in 1945 published by John von nuemann. Von nuemann's architecture is a hardware mechanisms which consisted of a control unit, Arithmetic Logic unit, Registers, Memory unit and inputs/ output. 

  • The operations of the Arithmetic Logic unit (ALU),memory and input/output devices are carried out under the supervision of the Control unit. 
  • The control unit is in charge of extracting the source program instructions, delivering it to the processor instruction register and forging a control signal. 
  • According to the contents of registers, a control signal is produced and sent to the concerned execution unit. 
  • Design and development of control units is cheaper,simplified and faster than that of other hardware mechanisms such as harvard architecture. 
  • Therefore this mechanism is still relevant and the control unit is widely found in modern computers.

Control Unit in Computer Architecture

Control Unit in Computer Architecture

Read More:


Functions of a Control Unit 

[Click Here for Sample Questions]

Functions of Circuit Unit are mentioned below:

  • It accepts external directions and commands to convert them into comprehensible series of control signals valid for the processor.
  • The control unit interprets the commands and instructions and forwards them to the concerned subunits of the processor. 
  • It maintains the sequence of instructions and data being regulated in the processor and prevents overlapping or miscommunication.
  • It governs the working of several execution units of the CPU (ALU, registers,etc)
  • It also carries out a number of activities such as fetching data, decoding instructions, handling commands, execution and storing of results.

Types of Control Unit

[Click Here for Sample Questions]

Control unit can be of two types based on different ways of execution of instructions. They can be either hardwired or Micro programmed.

Hardwired Control Unit

A combination of circuits formed by interconnecting intricate physical components like flip-flops and gates is utilized to carry out instructions. This fixed set of logic gates and circuits is called a hardwired control unit. 

  • The control signal for each instruction is hardwired into the control unit. 
  • Hence it is harder to upgrade and modify in comparison to micro programmable units as it would be impossible to make any changes in the production of control signals without physically modifying the circuit's structure. 

Structure of Hardwired Control Unit

A Hardwirеd Control Unit is constructеd using essential componеnts likе a sequence countеr, two dеcodеrs, flip-flops, and logic gatеs. Thе sеquеncе countеr has thе ability to count from 0 to 15 in binary. A 3 x 8 decoder is employed to еncodе thе operation codе found in bits 12 through 14, with its outputs dеsignatеd as D0 through D7.

  • Bit 15 of thе opеration codе is dirеctеd to a flip-flop markеd as I.
  • Thе control logic gatеs arе configured to rеspond to opеration codеs ranging from bits 0 to 11.
  • Dеspitе its array of componеnts, thе dеsign of thе hardwirеd control unit is straightforward and conducivе to еasy implеmеntation.
  • It dеlivеrs fast pеrformancе owing to its compact sizе and is also cost-effective.
  • Howеvеr, it has limitations as it can only support a predetermined sеt of instructions, making it rigid and not еasily modifiablе. 

Micro Programmable Control Unit

Microprogrammablе control units arе control units that utilizе microcodes to execute commands. Microcodes consist of a sеt of low-lеvеl hardware instructions that implement highеr-lеvеl machinе codе instructions.

  • Microcodе acts as an intеrmеdiary that translatеs machinе instructions, statе machinе data, or other inputs into detailed sеquеncеs of circuit-lеvеl operations.
  • This separation bеtwееn machine instructions and underlying electronics grants grеatеr flеxibility in dеsigning and modifying instructions. 
  • Furthеrmorе, it simplifies complеx multi-step instruction construction whilе rеducing thе intricacy of computеr circuits.
  • Microcodеs arе typically written and stored in dedicated mеmory units known as microprograms, and thеy arе responsible for gеnеrating control signals for еach instruction.
  • It's important to note that thеsе mеmory units arе inaccessible to programmеrs.
  • Dеspitе being largеr in sizе and relatively morе expensive upfront, microprogrammablе control units oftеn provе to be cost-effective in thе long run. 

On the basis of control signals, microgrammable Control units are further divided into two categories- 

  1. Horizontal Microprogrammed control unit: The control signals in horizontal microprogrammed control units are stored and represented in decoded binary format. The number of control signals is equal to the number of bits required. 
  • For example if 44 control signals are found in the processor then 44 bits are required. 
  • In this layout, multiple control signals can be generated at the same time. 
  • As the control signals are already decoded, no additional hardware for decoding is required which facilitates faster operation. 
  • It allows parallel processing applications and provides a higher degree of parallelism. It supports longer control words thus is more flexible.

  1. Vertical microprogrammed control unit: In vertical microprogrammed control units, the control signals are found in encoded binary format. Therefore for x control units- Log2(x) bits are needed. Subsequently it required a hardware decoder to implement control signals thus it is slower than horizontal microprogrammed control units. 
  • It provides a low degree of parallelism i.e. either 0 or 1 hence it supports short control words only. 
  • Though it assists easier implementation of new control signals, it is still less flexible than horizontal microprogrammed control units but more flexible than hardwired control units. 

Read More: Tree Topology


How does a Control Unit Work?

[Click Here for Sample Questions]

Control unit basically reads and ensures the smooth implementation of instructions. It oversees all the activities of the processor. It also directs and coordinates the operations of logic units,memory and input/output devices. Essentially, A control unit works to achieve efficient and well ordered execution of a program. When computer programs are loaded in the main memory, every instruction is stored in the address register. Now the role of CU comes into play. 

  • First it decodes the address of first instruction through the address register. 
  • After decoding the instruction is passed by CU through the buffer register and delivered to the instructions register (IR). 
  • The instructions register, read the instructions and send it to the concerned units or circuits for execution. 
  • Program counter, also known as the counter register is used to keep count of the number of instructions already executed 
  • The control unit also controls the working of input/output devices. 
  • It receives input from input devices through input and output registers. 
  • Then it is stored in the main memory of the computer (RAM). 
  • During program execution, if an instruction requires the input then the instruction register decodes the instruction and sends command signal to the main memory for retrieval of that input. 

Also Read:


Things to Remember

  • Control unit is a component of the computer's CPU. 
  • It is concerned with conveying instructions to the different parts of the processor and ensuring smooth synchronisation.
  • There are two types of control unit- hardwired and microprogrammed CU.
  • Hardwired control units have control units physically embedded in the circuits. 
  • Microprogrammed control units use microcodes for execution of complex instruction sets. 
  • Hardwired CU is the fastest CU, then comes the vertical microprogrammed CU and horizontal microprogrammed control unit.
  • Vertical microprogrammed CU is preferred over other CUs as it allows complex instruction sets and provides fair speed.

Sample Questions 

Ques. What is the basic task for a control unit? (2 marks)

Ans: The basic task of the control unit is to bring and execute instructions from the memory of a computer. It receives the input instruction/information from the user and converts it into control signals, which are then given to the CPU for further execution.

Ques. Give two examples of devices which use the control unit. (1 mark)

Ans: CPUs and GPUs are examples of devices which have the control unit.

Ques. What are control unit types? (1 mark)

Ans: There are two types of control units found in processor- (i)Hardwired control units 

(ii) Micro programmable control units.

Ques. . Which of the following is the function of the control unit in the CPU? (1 mark)
(a) It stores program instruction
(b) It decodes program instruction
(c) It performs logic operations
(d) None of the above

Ans: (b) It decodes program instruction

Explanation: Control unit takes instructions from memory and then decodes and executes these instructions. It controls and coordinates the functioning of all parts of the computer. The Control Unit's main task is to maintain and regulate the flow of information across the processor.

Control unit

Ques. Fill in the blank in the diagram. a) Input Unitb) Memory Unitc) Control Unitd) I/O Unit (1 mark)

Ans: c

Explanation: The control unit manages and coordinates the operations of a computer system. The ALU is responsible for performing all the arithmetic and bitwise operations . Therefore, both these units combine to form the brain of the computer ,which is the central processing unit.

Ques. If the control signals are generated by combinational logic, then they are generated by a type of _______________ controlled unit. (1 mark)
a) Micro programmed
b) Software
c) Logic
d) Hardwired

Ans: d

Explanation: The main task of a control unit is to generate control signals. There are two main types of control units:

A hardwired control unit generates control signals by using combinational logic circuits and the Micro programmed control unit generates control signals by using some softwares.

Ques. The microinstructions stored in the control memory of a processor have a width of 26 bits. Each microinstruction is divided into three fields: a micro-operation field of 13 bits, a next address field (X), and a MUX select field (Y). There are 8 status bits in the inputs of the MUX. (1 mark)
The microinstructions stored in the control memory of a processor have a width of 26 bits. Each microinstruction is divided into three fields: a micro-operation field of 13 bits, a next address field (X), and a MUX select field (Y). There are 8 status bits in the inputs of the MUX.
How many bits are there in the X and Y fields, and what is the size of the control memory in the number of words?
(A) 10, 3, 1024
(B) 8, 5, 256
(C) 5, 8, 2048
(D) 10, 3, 512

Ans: (A) Explanation: MUX has 8 states bits as input lines so we require 3 select inputs to select and input lines.

No. of bits in control memory next address field=26-13-3 =10

10 bit addressing .we have 2 10 memory size

So X,Y size=10,3

So (A) is the correct option.

Ques.Which is the simplest method of implementing a hardwired control unit? (1 mark)
a) State Table Method
b) Delay Element Method
c) Sequence Counter Method
d) Using Circuits

Ans: a

Explanation: There are 3 ways of implementing hardwired control unit:

A state table is the simplest method in which a number of circuits are designed based on the cells in the table. A delay element method consists of a flowchart drawn for the circuit. A D-flip flop is used as a delay element. A sequence counter method uses the k-modulo counter as a replacement for k delay elements.

Ques. The part of a processor which contains hardware necessary to perform all the operations required by a computer: (1 mark)
a) Data path
b) Controller
c) Registers
d) Cache

Ans: a

Explanation: A processor is a part of the computer which does all the data manipulation and decision making. A processor comprises of:

A data path which contains the hardware necessary to perform all the operations. A controller tells the data path what needs to be done.

The registers act as intermediate storage for the data.

Ques. Horizontal microprogramming : (1 mark)
(A) does not require use of signal decoders
(B) results in larger sized microinstructions than vertical microprogramming
(C) uses one bit for each control signal
(D) all of the above.

Ans: (D)

Explanation: In horizontal microprogramming the instruction size is less as compared to vertical microprogramming. So, there is no need for decoding.

But, one bit is used for all control signals to execute the microinstruction. If the bit is set to ‘1’ the control signal field is activated. If the bit is set to ‘0’ the control signal field is deactivated.

 Thus, option (D) is correct.

Ques. A CPU has only three instructions I1, I2, and I3, which use the following signals in time steps T1-T5: I1: T1: Ain, Bout, Cin T2: PCout, Bin T3: Zout, Ain T4: Bin, Cout T5: End I2 : T1: Cin, Bout, Din T2: Aout, Bin T3: Zout, Ain T4: Bin, Cout T5: End I3: T1: Din, Aout T2: Ain, Bout T3: Zout, Ain T4: Dout, Ain T5: End Which of the following logic functions will generate the hardwired control for the signal Ain? (2 marks)
(A) T1.I1 + T2.I3 + T4.I3 + T3
(B) (T1 + T2 + T3).I3 + T1.I1
(C) (T1 + T2 ).I1 + (T2 + T4).I3 + T3 
(D) (T1 + T2 ).I2 + (T1 + T3).I1 + T3

Ans: The correct Ans is option A

Ques. A hardwired CPU uses 10 control signals S1 to S10, in various time steps T1 to T5, to implement 4 instructions I1 to I4 as shown below: table which of the following pairs of expressions represent the circuit for generating control signals S5 and S10 respectively? ((Ij+Ik)Tn indicates that the control signal should be generated in time step Tn if the instruction being executed is Ij or lk)  (2 marks)
(A) S5=T1+I2⋅T3 and S10=(I1+I3)⋅T4+(I2+I4)⋅T5
(B) S5=T1+(I2+I4)⋅T3 and S10=(I1+I3)⋅T4+(I2+I4)⋅T5
(C) S5=T1+(I2+I4)⋅T3 and S10=(I2+I3+I4)⋅T2+(I1+I3)⋅T4+(I2+I4)⋅T5
(D) S5=T1+(I2+I4)⋅T3 and S10=(I2+I3)⋅T2+I4⋅T3+(I1+I3)⋅T4+(I2+I4)⋅T5

Ans: The correct Ans is option D.

For Latest Updates on Upcoming Board Exams, Click Here: https://t.me/class_10_12_board_updates


Check-Out: 

Comments


No Comments To Show