micro processor and its architecture unit1.pptx

AjayKumar626901 34 views 52 slides Jun 23, 2024
Slide 1
Slide 1 of 52
Slide 1
1
Slide 2
2
Slide 3
3
Slide 4
4
Slide 5
5
Slide 6
6
Slide 7
7
Slide 8
8
Slide 9
9
Slide 10
10
Slide 11
11
Slide 12
12
Slide 13
13
Slide 14
14
Slide 15
15
Slide 16
16
Slide 17
17
Slide 18
18
Slide 19
19
Slide 20
20
Slide 21
21
Slide 22
22
Slide 23
23
Slide 24
24
Slide 25
25
Slide 26
26
Slide 27
27
Slide 28
28
Slide 29
29
Slide 30
30
Slide 31
31
Slide 32
32
Slide 33
33
Slide 34
34
Slide 35
35
Slide 36
36
Slide 37
37
Slide 38
38
Slide 39
39
Slide 40
40
Slide 41
41
Slide 42
42
Slide 43
43
Slide 44
44
Slide 45
45
Slide 46
46
Slide 47
47
Slide 48
48
Slide 49
49
Slide 50
50
Slide 51
51
Slide 52
52

About This Presentation

A microprocessor is a compact, integrated circuit that serves as the brain of a computer system, executing instructions and managing the flow of data through various operations. It forms the core of a microcontroller, which in turn, powers a wide range of devices from computers and smartphones to ho...


Slide Content

Allied – IV: DIGITAL COMPUTER FUNDAMENTALS (U18CAY34) Unit I Number Systems

Contents Binary Arithmetic (Addition, Subtraction, Multiplication, 1’s and 2’s complements, 9’s Compliment, 10’s Compliments and Subtraction using complements) Binary Coded Decimal Number Representation. Conversions in Binary, Decimal, Octal, Hexadecimal BCD Codes (8421 code, 2421 and 4221 codes, Excess-3 Code, Gray Code ) Binary Character Codes (ASCII & EBCDIC Codes)

Introdution -Digital Computer It consists of 0’s and 1’s. It contains discrete (non-continuous value). It is a programmable machine that get some numerical values as input and process it and give some numerical values as output. Block Diagram of Digital computer

Introduction-Number System

Number System In digital computers, the number system is used for representing the information The digit value in the number system is calculated using • The digit • The index, where the digit is present in the number. • Finally, the base numbers, the total number of digits available in the number system Example: (786)10

… ctd In the digital computer, there are various types of number systems used for representing information. • Binary Number System (0-1)(Base 2) Ex: (1010110)2 • Decimal Number System(0-9)(Base 10) Ex:(786)10 • Octal Number System(0-7)(Base 8) Ex: (36)8 • Hexadecimal Number System(0-15)(Base 16) Ex: (A2F3)16 Note: (0-9)(Normal numbers) ; (10-15) (A-F)

Binary Arithmetic Addition(+) Subtraction(-) Multiplication(*) Division(÷)

Binary Addition

Binary Subtraction

Binary Multiplication

Binary Division

Workout for you 1. 1011+0101=?? 2. 1011-0101=?? 3. 111*100=? 4. 1111÷11=?

Binary Addition 1011 0101 (+) (10000) 2 Binary Subtraction 1011 0101(-) (0110)2 Binary Multiplication 111 100 (x) 000 000 111 11100

Home work for you 101111+110101=? 11001-10110=? 10101*10=? 1011÷10=?

Complements It is used to simplify subtract and logical operations Two Types r ’s complement(radix(or)base value) (r-1)’s complements Decimal 9’s and 10’s complement Binary 1’s and 2’s complement r n -N n=>number of digits N=> Number given

(r-1)’s complement (r n -1-N) complement r’s Complement (423) 10 =10 3 -423 =1000-423 =577

(r-1)’s complement (1100) 2 =r n -1-N =24-1-1100 =-1085

Subtraction using Complements 1’s Complement Subtraction Take the minuend in binary as it is. Take the 1’s complement of subtrahend and add it to the minuend. If a carry is produced, add the carry to the sum. The carry produced is called end-around carry. If carry is not produced, it indicates that the result is negative and the result is in 1’s complement form.

Example Subtract 4 from 13.

Subtract 18 from 12.

2’s Complement Subtraction: In this method, the following three steps are followed. Take the minuend in binary as it is. Take the 2’s complement of subtrahend and add it to the minuend. If a carry is produced, ignore the carry. If a carry is not produced, it indicates that the result is negative and the result is in 2’s complement form.

Example Subtract 4 from 13.

Subtract 18 from 12.

9’s Complement Subtraction Take the minuend as it is. Take the 9’s complement of the subtrahend and add it to the minuend. If a carry is produced add the carry to the sum.

Example Subtract 8-5

10’s complement Subtraction Take the minuend as it is. Take the 10’s complement of the subtrahend and add it to the minuend. Ignore the carry. Example Subtract 8-5

Workout for you Perform the following operations in binary number system 12+13 64-35 6*7 12÷3 Give the 1’s and 2’s complement forms for the following binary numbers 10011 110011 10101110

Using 9’s complement and 1’s complement method perform the following operations 98-75 26-43 Using 10’s complement and 2’s complement method perform the following operations 98-75 26-43

Signed Binary Numbers Separate Bit to indicate the sign of the number. Bit 0=> Positive numbers(+) Bit 1=>Negative numbers(-) Bit used to represent the sign of the number is called the sign bit. Sign Bit is the MSB of a binary number. Decimal Sign-Magnitude +5 0 000 0101 -5 1 000 0101

8 bit numbers => 1 sign bit and 7 magnitude bits. Range is -127 to +127. 16-bit numbers=> 1 sign bit and 15 magnitude bits Range is -32,767 to +32,767. Positive numbers are represented in their true binary form with a 0 as sign bit in MSB position. Negative numbers are represented with a 1 as sign bit in the MSB position and the magnitude part can be represented in any one of three different ways.

Sign-magnitude. Sign-1’s complement. Sign-2’s complement.

Sign-1’s complment To represent a negative number in 1’s complement form, the following two steps are used. Write the positive binary form of the number, including the sign bit. Invert each bit, including the sign bit, i.e. take 1’s complement. Eg : -12 -93

Sign-2’s complement To represent a negative number in 2’s complement form, the following three steps are used. Write the positive binary form of the number, including the sign bit. Invert each bit, including the sign bit, i.e take 1’s complement. Add 1 to the result. Eg : -12 -93

Example +6 and +8 -6 and +8 +6 and -8 -6 and -8

Workout for you +95 and +27 +95 and -27 -95 and +27 -95 and -27

Conversions from one number system to other Decimal Number System Binary Number system 4-bit binary word – nibble 8-bit binary word – byte 16-bit binary word- word 32-bit binary word – double word.

Convert the following decimal numbers to binary 66 1021 48.25 Convert the following binary numbers to decimal 11101 1011010 1101.1011

Weighted Code The 2421 and 8421 codes are an examples of weighted code. In a weighted code the bits are multiplied by the weights indicated and the some of the weighted bits gives the decimal digits. 4221 and 2421 are self complementing codes. For eg : The bit combination 1101 when weighted by the respective digits 8421 gives the decimal equivalent 13. For this reason it is called as weighted code.

Unweighted Code The excess 3 code is a decimal code that has been used in older computers. It is an unweighted code. It’s binary code assignment is obtained from the corresponding BCD equivalent. Binary number after the addition of Binary 3(0011).

Decimal 8421 2421 4221 0000 0000 0000 1 0001 0001 0001 2 0010 0010 0010 3 0011 0011 0011 4 0100 0100 0110 5 0101 1011 1001 6 0110 1100 1100 7 0111 1101 1101 8 1000 1110 1110 9 1001 1111 1111

Excess 3 Code Decimal 8421 Excess-3 0000 0011 1 0001 0100 2 0010 0101 3 0011 0110 4 0100 0111 5 0101 1000 6 0110 1001 7 0111 1010 8 1000 1011 9 1001 1100

Excess 3 Addition

BCD Codes-8421 Codes A group of bits (usually four) which are used to represent decimal numbers 0 to 9 are called Binary Coded Decimal codes or BCD codes. Most popular BCD code is the 8421 code. Each digit must be represented by a 4-bit BCD code.

BCD (8421) Addition Add the two numbers, using the rules of binary addition. If the 4-bit sum is equal to or less than 9, it is a valid BCD number. If the 4-bit sum is greater than 9, or if a carry out of a BCD group is generated, the result is invalid BCD. To get the correct BCD result, add 6 ( ie . 0110) to the first group and take the carry to the next group.

Gray Code First higher order bit as it is in binary code then do modulo for the consequtive binary code number. It is a code that gives only one transition in sequential manner. Eg : Shaft encoding.

Decimal Binary Gray 0000 0000 1 0001 0001 2 0010 0011 3 0011 0010 4 0100 0110 5 0101 0111 6 0110 0101 7 0111 0100 8 1000 1100 9 1001 1101 10 1010 1101 11 1011 1110 12 1100 1010 13 1101 1011 14 1110 1001 15 1111 1000

Binary to Gray Conversion Keep the higher bit that is first bit of binary code as it is then do modulo for the consequtive bits. The MSB of the Gray code is the same as the MSB of the binary. Coding from left to right, add each adjacent pair of bits to get the next bit of the gray code. Omit the carries if occurs.

Gray to Binary Conversion Keep the higher order bit that is first bit of gray code as it is then compare that first bit with the second bit of gray code that is modulo. The MSB of the binary is the same as the MSB of the Gray . Coding from left to right, add the binary digit generated to the adjacent Gray bit to get the next bit of the binary. Omit the carries if occurs.

ASCII Code It stands for American Standard Code for Information Interchange. It is a seven bit code. It is represented in alpha numeric code. It consists of 2 7 (128) binary combinations. Alpha numeric code contains Decimal(0 to 9) Alphabets (a to z) DEL (Delete) ESC (Escape) STX (Start Text) ETX (End of Text)

ASCII Symbol Decimal Hex 7-binary 48 30 011 0000 1 49 31 011 0001 2 50 32 011 0010 9 57 39 011 1001 : 58 3A 011 1010 ? 63 3F 011 1111 A 65 41 100 0001 B 66 42 100 0010 Z 90 5A 101 1010 a 97 61 110 0001 b 98 62 110 0010 z 122 7A 111 1010 DEL 127 7F 111 1111

EBCDIC Another alpha numeric code commonly used in IBM machines is called as Extended Binary Coded Decimal Interchange Code. It is an 8-bit code. It is also consists of alpha numeric code.

Unit I = 100 marks split up 100 marks converted to 40 marks internals CIA. Unit I Test Assignment Note submission Total 60 marks 10 marks converted to 20 marks 10 marks converted to 20 marks 60+20+20=100 marks