CSA - Unit2
CSA - Unit2
CSA - Unit2
A Register is a collection of flip flops. A flip flop is used to store single bit digital data. For storing a large number of
bits, the storage capacity is increased by grouping more than one flip flops. If we want to store an n-bit word, we have
to use an n-bit register containing n number of flip flops
Register load
The transfer of new information into a register is referred to as loading the register. If all the bits of the register are
loaded simultaneously with a common clock pulse transition, we say that the loading is done in parallel.
Shift Registers
1. Shift Register is a group of flip flops used to store multiple bits of data.
2. The bits stored in such registers can be made to move within the registers and in/out of the registers by applying
clock pulses.
3. An n-bit shift register can be formed by connecting n flip-flops where each flip-flop stores a single bit of data.
4. The registers which will shift the bits to the left are called “Shift left registers”.
5. The registers which will shift the bits to the right are called “Shift right registers”.
The serial input determines what goes into the leftmost position during the shift.
The serial output is taken from the output of the rightmost flip-flop.
Types of Shift Registers
The shift register, which allows serial input (one bit after the other through a single data line) and produces a parallel
output is known as the Serial-In Parallel-Out shift register. The logic circuit given below shows a serial-in-parallel-out
shift register. The circuit consists of four D flip-flops which are connected. The clear (CLR) signal is connected in
addition to the clock signal to all 4 flip flops in order to RESET them. The output of the first flip-flop is connected to the
input of the next flip flop and so on
Parallel-In Serial-Out Shift Register (PI
The shift register, which allows parallel input (data is given separately to each flip flop and in a simultaneous manner) and
produces a serial output is known as a Parallel-In Serial-Out shift register. The logic circuit given below shows a parallel-in-
serial-out shift register. The circuit consists of four D flip-flops which are connected. SO)
Parallel-In Parallel-Out Shift Register (PIPO)
The shift register, which allows parallel input (data is given separately to each flip flop and in a simultaneous manner)
and also produces a parallel output is known as Parallel-In parallel-Out shift register
Bidirectional Shift Register
S.N. Condition Operation
Universal Shift Register is a type of register that contains the both right shift and the left shift. It has also parallel
load capabilities. Generally, these types of registers are taken as memory elements in computers. But, the problem
with this type of register is that it shifts only in one direction. In simple words, you mean that the universal shift
register is a combination of the bidirectional shift register and the unidirectional shift register.
Binary Counter
A register that goes through a predetermined sequence of states upon the application of input
pulses is called a counter.
The binary counters are built up of flip flops, where a flip flop is a most elementary memory
element that can store 1-bit of information. In a binary counter, each flip flop represents one bit
of the binary number. The counter increases its count by one whenever a clock pulse occurs.
Synchronous Counter − The type of binary counter in which all the flip flops receive the
same clock pulse at the same time is known as a synchronous counter.
Up Counter − The type of binary counter that counts upwards from zero to its maximum
count value is known as up counter. In the case of up counter, the count is increased by one
on each clock pulse.
Down Counter − The type of binary counter that counts downwards from its maximum count
value to zero is known as a down counter. In the down counter, the count value of the counter
is decreased by one on each clock pulse.
Up/Down Counter − The type of binary counter that can count in both upward and
downward directions is known as a up/down counter. In the up/down counter, the direction of
count is determined by a control input signal
Memory Unit
A memory unit is a collection of storage cells together with associated circuits needed to transfer information in and out of
storage. The memory stores binary information in groups of bits called words
A memory word is a group of l's and O's and may represent a number, an instruction code, one or more alphanumeric
characters, or any other binary-coded information. A group of byte eight bits is called a byte.
Computer memories may range from 1024 words, requiring an address of 10 bits, to 2 32 words, requiring 32 address bits. It is
customary to refer to the number of words (or bytes) in a memory with one of the letters K (kilo), M (mega), or G (giga).
K is equal to 210
M is equal to 220
and G is equal to 230
Thus 64K = 216
2M = 221 and 4G=232
Two major types of memories are used in computer systems: random-access
memory (RAM) and read-only memory (ROM).
The two operations that a random-access memory can perform are the write and read
operations. The write signal specifies a transfer-in operation and the read signal specifies
a transfer-out operation.
The steps that must be taken for the purpose of transferring a new word to be stored
into memory are as follows:
1.Apply the binary address of the desired word into the address lines.
2.Apply the data bits that must be stored in memory into the data input lines.
The steps that must be taken for the purpose of transferring a stored word out of
memory are as follows:
1. Apply the binary address of the desired word into the address lines.
2. Activate the read input.
Read-Only Memory
a read-only memory (ROM) is a memory unit that performs the read operation only; it does not have a write
capability. This implies that the binary information stored in a ROMis made permanent during the hardware
production of the unit and cannot be altered by writing different words into it.
Types of ROMs
= (1010111100)2
= (001 010 111 100)2
= (1 2 7 4)8
= (1274)8
= (0110 011.1011)2
= (0 110 011 . 101 1)2
= (110 011 . 101 100)2
= (6 3 . 5 4)8
= (63.54)8
Fixed-Point Representation
• Positive integers, including zero, can be represented as unsigned
numbers. However, to represent negative integers, we need a notation for
negative values.
• Integer Representation
When an integer binary number is positive, the sign is represented by 0 and
the magnitude by a positive binary number. When the number is negative,
the sign is represented by 1 but the rest of the number may be represented
in one of three possible ways:
1. Signed-magnitude representation
2. Signed-l's complement representation
3. Signed 2's complement representation
• The signed-magnitude representation of a negative number consists
of the magnitude and a negative sign. In the other two
representations, the negative number is represented in either the l's
or 2's complement of its positive value.
• consider the signed number 14 stored in an 8-bit register. +14 is
represented by a sign bit of 0 in the leftmost position followed by the
binary equivalent of 14: 00001110. Note that each of the eight bits of
the register must have a value and therefore 0's must be inserted in
the most significant positions following the sign bit. Although there is
only one way to represent +14, there are three different ways to
represent —14 with eight bits.
• In signed-magnitude representation 1 0001110
• In signed-l's complement representation 1 1110001
• In signed-2's complement representation 1 1110010
Arithmetic Addition
• The addition of two numbers in the signed-magnitude system follows
the rules of ordinary arithmetic. If the signs are the same, we add the
two magnitudes and give the sum the common sign. If the signs are
different, we subtract the smaller magnitude from the larger and give
the result the sign of the larger magnitude.
Floating-Point Representation
• The floating-point representation of a number has two parts. The first
part represents a signed, fixed-point number called the mantissa. The
second part designates the position of the decimal (or binary) point
and is called the Exponent. The fixed-point mantissa may be a
fraction or an integer.
For example, the decimal number +6132.789 is represented in floating-
point with a fraction and an exponent as follows:
• Floating-point is always interpreted to represent a number in the
following form:
Fraction
• The fraction has a 0 in the leftmost position to denote positive. The
binary point of the fraction follows the sign bit but is not shown in the
register. The exponent has the equivalent binary number +4. The
floating-point number is equivalent to
Normalization
• A floating-point number is said to be normalized if the most
significant digit of the mantissa is nonzero.
Other Binary Codes
• Gray Code : The Gray Code is a sequence of binary number systems,
which is also known as reflected binary code.
Error Detection Codes:
• A parity bit is an extra bit included in binary message to make total
number of 1’s either odd or even. Parity word denotes number of 1’s in
a binary string. There are two parity system – even and odd parity
checks.