Coa Module 2 Explain To Students
Coa Module 2 Explain To Students
Tech
Module 2: Data
Representation and
Operations in COA
Course Name: Computer Architecture and organization[22CSE104]
Total Hours : 08
Data Representation and Data Types
• Digital computers store and process information in binary form as digital logic
has only two values "1" and "0" or in other words "True or False" or also said as
"ON or OFF“.
• We human generally deal with
• Decimal ( Radix 10)
• Octal (Radix 8)
• Hexadecimal (Radix 16)
• Binary coded decimal (BCD),
Every computer's CPU has a width measured in terms of bits such as
• 8 bit CPU,
• 16 bit CPU,
• 32 bit CPU
• 64 bit CPU
Types of Cycles
Fetch cycle
It interprets the fetched memory content to be instruction and decodes
based on Instruction format.
Execute cycle
• The information from memory is considered as data
• As a common man think computers handle English or other alphabets, special
characters or numbers.
• A programmer considers memory content to be data types of the programming
language he uses,
Data Representation in Computers
• Character data
• A sequence of character is called character data.
• A character may be alphabetic (A-Z or a-z), numeric (0-9), special character
(+, #, *, @, etc.) or combination of all of these. A character is represented by
group of bits.
Example of character data
• Rajneesh1#
• 229/3, xyZ
• Mission Milap – X/10
Computer data types
Logical data
Character set
Radix Complement
It is a key for binary subtraction, multiplication, division. There are four rules of
binary addition.
Binary Subtraction
Subtraction and Borrow, these two words will be used very frequently for the
binary subtraction. There are four rules of binary subtraction.
Binary Multiplication
The binary division operation is similar to the base 10 decimal system, except
the base 2
• 1÷1 = 1
• 1÷0 = Meaningless
• 0÷1 = 0
• 0÷0 = Meaningless
ERROR DETECTING AND CORRECTING CODES
• While the addition bits helps in achieving the goal of making transmission of
information from one place to another error free or reliable,
20
ERROR DETECTING AND CORRECTING CODES
• Parity Code
• Repetition Code
• Hamming Code
21
ERROR DETECTING AND CORRECTING CODES
• Parity Code:
• A parity bit is an extra bit added to a string of data bits
• It was being stored or processed and moved from one place to another in a digital system.
• This simple parity code suffers from two limitations.
• It cannot detect the error if the number of bits having undergone a change is even.
• Repetition Code:
• The repetition code makes use of repetitive transmission of each data bit in the bit
stream.
• In the case of threefold repetition, ‘1’ and ‘0’ would be transmitted as ‘111’ and ‘000’
respectively.
• The repetition code is highly inefficient
• Data bit needs to be repeated to build error detection and correction capability.
22
ERROR DETECTING AND CORRECTING CODES
• Hamming Code:
• An increase in the number of redundant bits added to message bits
• It can enhance the capability of the code to detect and correct errors.
• If sufficient number of redundant bits arranged such that different error bits
produce different error results
• In fact, the addition of redundant bits alters the ‘distance’ code parameter,
which has come to be known as the Hamming distance.
• Hamming Distance:
• The Hamming distance is nothing but the number of bit disagreements
between two code words.
23
ERROR DETECTING AND CORRECTING CODES
• The algorithm for writing the generalized Hamming code is as follows:
2.We can see from the generalized form of the code that all bit positions that
are powers of 2 (positions 1, 2, 4, 8, 16 ...) are used as parity bits.
3.All other bit positions (positions 3, 5, 6, 7, 9, 10, 11 ...) are used to encode
data.
4.Each parity bit is allotted a group of bits from the data bits in the code word,
and the value of the parity bit (0 or 1) is used to give it certain parity.
24
ERROR DETECTING AND CORRECTING CODES
• The code word sequence for this code is written as P1P2D1P3D2D3D4, with
P1, P2 and P3 being the parity bits and D1, D2, D3 and D4 being the data bits.
25
RTL
RTL
Register Transfer Language
•2. The sequence of micro operations performed on the binary information stored
in the registers.
•3. The control hardware register that initiates the sequence of micro operations.
RTL
Register Transfer Language Advantages
• For example,
•The statement R2 <--R1 transfer of the content of register R1 into register R2.
• By definition, the content of the source register R1 does not change after the
transfer.
Register Transfer Language
• A digital computer has many registers, and paths must be provided to transfer
information from one register to another.
• Separate lines are used between each register and all other registers in the
system.
• The two selection lines S1 and S0 are connected to the selection inputs of all
four multiplexers.
• The selection lines choose the four bits of one register and transfer them into
the four-line common bus.
• When S1S0 = 00, the 0 data inputs of all four multiplexers are selected and
applied to the outputs that form the bus.
• When S1S0 = 00 happens the bus lines to receive the content of register .
• Since the outputs of this register are connected to the 0 data inputs of the
multiplexers.
• Similarly, register B is selected if S1S0 = 01, and so on
Bus and Memory Transfers
0 0 A
0 1 B
1 0 C
1 1 D
Bus and Memory Transfers
Administrator
Retrieve User Info
Display
Account User
Profile Info
Validate
Update User
Info
Enter/Update/ Delete User
Update/Delete User Info
Info
Arithmetic micro operations
• Binary Adder
The 2's complement can be obtained by taking the 1' s complement and adding
The 1's complement can be implemented with inverters and a one can be added to the
• This micro operation is easily implemented with a binary counter every time the
count enable is active, the clock pulse transition increments the content of the
register by one.
• There may be occasions when the increment micro operation must be done with a
combinational circuit independent of a particular register.
Figure 2.8: 4- bit Binary incrementer
Arithmetic Circuit
• The arithmetic micro operations listed in below table can be implemented in one circuit.
• By controlling the data inputs to the adder, it is possible to obtain different types of arithmetic
operations
• A is the 4-bit binary number at the X inputs
• Note that the symbol + in the equation above denotes an arithmetic plus.
• Logic micro operations specify binary operations for strings of bits stored in
registers.
• These operations consider each bit of the register separately and treat them as
binary variables.
• For example, the exclusive-OR micro operation with the contents of two registers
R 1 and R2 is symbolized by the statement
• P: R1 R1 ⊕ R2
• It specifies a logic micro operation to be executed on the individual bits of the
registers provided that the control variable P = 1.
•As a numerical example, assume that each register has four bits.
R1 be 1010
R2 be 1100
The exclusive-OR microoperation stated the following logic
computation:
• 1010 Content of R 1
• 1 100 Content of R2
• 0110 Content ofR 1 after P = 1
Shift Microoperations
.
Thank you