Micro-Operations Digital Logic and Computer Design by Ravinder Nath Rajotiya - December 11, 2022December 16, 20220 Share on Facebook Share Send email Mail Print Print Table of Contents Toggle IntroductionMicro-operations:Types of micro-operations:Inter register-transfer micro-operations:Control Statement:Basic Symbols used in register Transfer logicMemory transfer exampleArithmetic and Logic OperationsImplementation of Arithmetic Circuits4-bit binary adder subtractor.Logical and shift Micro-operationsConditional Control statement Introduction Internal organization of a digital system is defined by sequence of micro-operations it performs on the data stored in its registers. The general purpose digital computer is capable of executing various micro-operations and, in addition, can be instructed as to what specific sequence of operations it must perform. Now we define basic terminologies: A program is a set of instructions that specify the operations, operands, and the sequence by which the processing has to occur. A computer instruction is a binary code that specifies a sequence of micro-operations for the computer. Instruction code is a group of bits that instruct the computer to perform a specific operation that is usually divided into parts and the most basic part is the operation code. Operation code : The operation code part of an instruction is a group of bits that define operations such as add, subtract….etc. and the operation must be performed on some data variables. An instruction code therefore must specify not only the operation but also the registers or memory words where the operands are to be found or where the result is to be stored. So the processor registers can be specified by assigning another binary code of say k-bits. That simply means that with k-bits, we can have up to 2k registers in a system. Also there are many variations of arranging the binary code of an instruction. This can be for example register transfer (or operation), immediate transfer(or operation), direct or indirect memory transfer (or operation) Micro-operations: These are the operations performed on the data stored in the registers and is an elementary operation that is performed in parallel during one clock pulse period. Types of micro-operations: Inter register-transfer micro-operations Arithmetic micro-operations Logic and Shift micro-operations Inter register-transfer micro-operations: Figure – Register Arrangements The way of declaration of registers is as follows: Full registers are declared with their name and size such as A(8), PC(16), MBR(12) Part of registers are declared as PC(H) = PC(15-8); PC(L) = PC(7-0) A <– B denotes transfer content of B in to register A, but this will happen with every clock which we do not want to happen. So we need to transfer under predetermined control conditions. Control Statement: The condition that determines when the transfer is to occur is called the control function, which is a Boolean function that can be equal to ‘1’ or ‘0’. Example: Figure – hardware implementation of x’T1 X’T1 : A <–B ; This will transfer content of register B to register A when X’.T1 is true Exchange micro-operation T3 : A <– B, B <– A Basic Symbols used in register Transfer logic Symbol Description Example Letters (and Numerals) Denotes a register A, MBR, PC etc Subscript Denote a bit of register A2, R4 Parenthesis () Portion of a register PC(H), MBR(OP) Arrow –> Direction of operation/transfer A Colon : Termination of control function A’T1 : Comma , Separation of two microoperations A Square bracket [ ] Address for memory transfer MBR Memory transfer example W : M <– MBR ; It transfer content of MBR register into memory when the write (W) control statement is active W: M[A1] <– B2; transfer the content of register B into the memory whose address is in register A R : B0 <– M[A3]; It transfer the content of memory from address given in A3 register into register B Figure- Memory Transfer Arithmetic and Logic Operations Symbolic Designation Description F Addition F Subtraction B 1’s Complement B 2’s complement F A-B A increment A decrement Implementation of Arithmetic Circuits We can easily implement any micro-operations with hardware with registers to hold operands/or data and the circuit that actually performs a particular operation. Figure – implementation of add and increment Arithmetic operation (Add and Increment) : T2 : A <– A + B A plus B T5 : A <– A + 1 Increment A Binary Adder – A 4-bit binary adder implemented using four Full Adders. The first stage carry is assumed to be zero, the carry from any stage is propagated to the next stage full adder. The complete circuit of a 4-bit binary adder is shown below. Figure – 4-bit binary adder 4-bit binary adder subtractor. Figure – 4-bit binary adder subtractor Logical and shift Micro-operations Symbolic Designation Description A 1’s Complement F : A \/ B LOGIC OR F: A ^ B Logic AND F : A xor B Exclusive OR A Shift Left Accumulator A Shift Right Accumulator Conditional Control statement P : if (condition) then [microperation(s)] else [microoperation(s)] T2: if (c=0) the (F <– 1) else (F <– 0) It is same as C’T2 : F <– 1 CT2 : F <– 0 Share on Facebook Share Send email Mail Print Print