Logic Switching and Design, Papers of Information and Computer Technology

Binary Arithmetic Computation Logic Switching and Design

Typology: Papers

2020/2021

Uploaded on 03/26/2021

arianne-gail-remoroza
arianne-gail-remoroza 🇵🇭

2 documents

1 / 13

Toggle sidebar

This page cannot be seen from the preview

Don't miss anything!

bg1
Module - 1
NUMBER SYSTEMS & CODES
Introduction about digital system
Philosophy of number systems
Complement representation of negative numbers
Binary arithmetic
Binary codes
INTRODUCTION ABOUT DIGITAL SYSTEM
A Digital system is an interconnection of digital modules and it is a system that manipulates
discrete elements of information that is represented internally in the binary form.
Now a day’s digital systems are used in wide variety of industrial and consumer products such as
automated industrial machinery, pocket calculators, microprocessors, digital computers, digital watches,
TV games and signal processing and so on.
Characteristics of Digital systems
Digital systems manipulate discrete elements of information.
Discrete elements are nothing but the digits such as 10 decimal digits or 26 letters of alphabets and
so on.
Digital systems use physical quantities called signals to represent discrete elements.
In digital systems, the signals have two discrete values and are therefore said to be binary.
A signal in digital system represents one binary digit called a bit. The bit has a value either 0 or 1.
Analog systems vs Digital systems
Analog system process information that varies continuously i.e; they process time varying signals
that can take on any values across a continuous range of voltage, current or any physical parameter.
Digital systems use digital circuits that can process digital signals which can take either 0 or 1 for
binary system.
pf3
pf4
pf5
pf8
pf9
pfa
pfd

Partial preview of the text

Download Logic Switching and Design and more Papers Information and Computer Technology in PDF only on Docsity!

Module - 1 NUMBER SYSTEMS & CODES

  • Introduction about digital system
  • Philosophy of number systems
  • Complement representation of negative numbers
  • Binary arithmetic
  • Binary codes INTRODUCTION ABOUT DIGITAL SYSTEM A Digital system is an interconnection of digital modules and it is a system that manipulates discrete elements of information that is represented internally in the binary form. Now a day’s digital systems are used in wide variety of industrial and consumer products such as automated industrial machinery, pocket calculators, microprocessors, digital computers, digital watches, TV games and signal processing and so on. Characteristics of Digital systems
  • Digital systems manipulate discrete elements of information.
  • Discrete elements are nothing but the digits such as 10 decimal digits or 26 letters of alphabets and so on.
  • Digital systems use physical quantities called signals to represent discrete elements.
  • In digital systems, the signals have two discrete values and are therefore said to be binary.
  • A signal in digital system represents one binary digit called a bit. The bit has a value either 0 or 1. Analog systems vs Digital systems Analog system process information that varies continuously i.e; they process time varying signals that can take on any values across a continuous range of voltage, current or any physical parameter. Digital systems use digital circuits that can process digital signals which can take either 0 or 1 for binary system.

Advantages of Digital system over Analog system

  1. Ease of programmability The digital systems can be used for different applications by simply changing the program without additional changes in hardware.
  2. Reduction in cost of hardware The cost of hardware gets reduced by use of digital components and this has been possible due to advances in IC technology. With ICs the number of components that can be placed in a given area of Silicon are increased which helps in cost reduction. 3.High speed Digital processing of data ensures high speed of operation which is possible due to advances in Digital Signal Processing.
  3. High Reliability Digital systems are highly reliable one of the reasons for that is use of error correction codes.
  4. Design is easy The design of digital systems which require use of Boolean algebra and other digital techniques is easier compared to analog designing.
  5. Result can be reproduced easily Since the output of digital systems unlike analog systems is independent of temperature, noise, humidity and other characteristics of components the reproducibility of results is higher in digital systems than in analog systems. Disadvantages of Digital Systems
    • Use more energy than analog circuits to accomplish the same tasks, thus producing more heat as well.
    • Digital circuits are often fragile, in that if a single piece of digital data is lost or misinterpreted the meaning of large blocks of related data can completely change.
    • Digital computer manipulates discrete elements of information by means of a binary code.
    • Quantization error during analog signal sampling.

For Ex: 1001.01 2 = [ ( 1 ) × 2^3 ] + [ ( 0 ) × 22 ] + [ ( 0 ) × 2^1 ] + [ ( 1 ) × 20 ] + [ ( 0 ) × 2-^1 ] + [ ( 1 ) × 22 ] 1001.01 2 = [ 1 × 8 ] + [ 0 × 4 ] + [ 0 × 2 ] + [ 1 × 1 ] + [ 0 × 0.5 ] + [ 1 × 0.25 ] 1001.01 2 = 9.25 10 Decimal Number system The decimal system has ten symbols: 0,1,2,3,4,5,6,7,8,9. In other words, it has a base of 10. Octal Number System Digital systems operate only on binary numbers. Since binary numbers are often very long, two shorthand notations, octal and hexadecimal, are used for representing large binary numbers. Octal systems use a base or radix of 8. It uses first eight digits of decimal number system. Thus it has digits from 0 to 7. Hexa Decimal Number System The hexadecimal numbering system has a base of 16. There are 16 symbols. The decimal digits 0 to 9 are used as the first ten digits as in the decimal system, followed by the letters A, B, C, D, E and F, which represent the values 10, 11,12,13,14 and 15 respectively. Decima l Binar y Octal Hexadeci mal 0 0000 0 0 1 0001 1 1 2 0010 2 2 3 0011 3 3 4 0100 4 4 5 0101 5 5 6 0110 6 6 7 0111 7 7 8 1000 10 8 9 1001 11 9 10 1010 12 A 11 1011 13 B 12 1100 14 C 13 1101 15 D 14 1110 16 E 15 1111 17 F

Number Base conversions The human beings use decimal number system while computer uses binary number system. Therefore it is necessary to convert decimal number system into its equivalent binary. i) Binary to octal number conversion ii) Binary to hexa decimal number conversion iii) Octal to binary Conversion iv) Hexa to binary conversion v) (^) Octal to Decimal conversion Ex: convert 4057.06 8 to octal =4x8^3 +0x8^2 +5x8^1 +7x8^0 +0x8-^1 +6x8-^2 =2048+0+40+7+0+0.

0.67510=0.675x16 -- 10.

= 0.800x16 -- 12.8 ↓ 0.800x16 -- 12. =0.800x16 -- 12. =0.ACCC 16 2598.675 10 = A26.ACCC 16 ix) Octal to hexadecimal conversion: The simplest way is to first convert the given octal no. to binary & then the binary no. to hexadecimal. Ex: 756.603 8 7 5 6. 6 0 3 111 101 110. 110 000 011 0001 1110 1110. 1100 0001 1000 1 E E. C 1 8 x) Hexadecimal to octal conversion: First convert the given hexadecimal no. to binary & then the binary no. to octal. Ex: B9F.AE =5637. Complements: In digital computers to simplify the subtraction operation & for logical manipulation complements are used. There are two types of complements used in each radix system. i) The radix complement or r’s complement ii) The diminished radix complement or (r-1)’s complement

B 9 F. A E

Representation of signed no.s binary arithmetic in computers:

  • Two ways of rep signed no.s
    1. Sign Magnitude form
    2. Complemented form
  • Two complimented forms
    1. 1‘s compliment form
    2. 2‘s compliment form Advantage of performing subtraction by the compliment method is reduction in the hardware.( instead of addition & subtraction only adding ckt‘s are needed.) i. e, subtraction is also performed by adders only. Instead of subtracting one no. from other the compliment of the subtrahend is added to minuend. In sign magnitude form, an additional bit called the sign bit is placed in front of the no. If the sign bit is 0, the no. is +ve, If it is a 1, the no is _ve. Ex: 0 1 0 1 0 0 1 Sign bit =+41 magnitude 1 1 0 1 0 0 1 = - 41 Note: manipulation is necessary to add a +ve no to a – ve no Representation of signed no.s using 2’s or 1’s complement method: If the no. is +ve, the magnitude is rep in its true binary form & a sign bit 0 is placed in front of the MSB.I f the no is _ve , the magnitude is rep in its 2‘s or 1‘s compliment form &a sign bit 1 is placed in front of the MSB. Ex: Given no. Sign mag form 2‘s comp form 1‘s comp form 01101 +13 +13 + 010111 +23 +23 + 10111 - 7 - 7 - 8 1101010 - 42 - 22 - 21

Methods of obtaining 2’s comp of a no:

  • In 3 ways
    1. By obtaining the 1‘s comp of the given no. (by changing all 0‘s to 1‘s & 1‘s to 0‘s) & then adding 1.
    2. (^) By subtracting the given n bit no N from 2 n
    3. Starting at the LSB , copying down each bit upto & including the first 1 bit encountered , and complimenting the remaining bits. Ex: Express - 45 in 8 bit 2‘s comp form +45 in 8 bit form is 00101101 I method : 1‘s comp of 00101101 & the add 1 00101101 11010010 +

11010011 is 2‘s comp form II method: Subtract the given no. N from 2 n 2 n^ = 100000000 Subtract 45= - 00101101 +

11010011 is 2‘s comp III method: Original no: 00101101 Copy up to First 1 bit 1 Compliment remaining : 1101001 bits 11010011 Ex:

  • 73.75 in 12 bit 2‘s comp form I method 01001001. 10110110. + 10110110.0100 is 2‘s II method: 28 = 100000000. Sub 73.75=-01001001. 10110110.0100 is 2‘s comp III method : Orginalno : 01001001. Copy up to 1‘st bit 100 Comp the remaining bits: 10110110. 10110110. 2’s compliment Arithmetic:
  • The 2‘s comp system is used to rep – ve no.s using modulus arithmetic. The word length of a computer is fixed. i.e, if a 4 bit no. is added to another 4 bit no. the result will be only of 4 bits. Carry if any , from the fourth bit will overflow called the Modulus arithmetic. Ex:1100+1111=
  • In the 2‘s compl subtraction, add the 2‘s comp of the subtrahend to the minuend. If there is a carry out , ignore it , look at the sign bit I,e, MSB of the sum term .If the MSB is a 0, the result is positive.& it is in true binary form. If the MSB is a ` ( carry in or no carry at all) the result is negative.& is in its 2‘s comp form. Take its 2‘s comp to find its magnitude in binary. Ex: Subtract 14 from 46 using 8 bit 2‘s comp arithmetic:
  • 14

= 11110010 2‘s comp +46 = 00101110

  • 14 =+11110010 2‘s comp form of - 14

1’s compliment arithmetic: In 1‘s comp subtraction, add the 1‘s comp of the subtrahend to the minuend. If there is a carryout , bring the carry around & add it to the LSB called the end around carry. Look at the sign bit (MSB). If this is a 0, the result is +ve & is in true binary. If the MSB is a 1 ( carry or no carry ), the result is – ve & is in its is comp form .Take its 1‘s comp to get the magnitude inn binary. Ex: Subtract 14 from 25 using 8 bit 1‘s EX: ADD - 25 to + 25 = 00011001 +14 = 00001110

  • 45 = 11110001 - 25 =+ +11 (1)

No carry MSB = 00001011 result=-ve=-^1110 MSB is a 0 so result is +ve (binary ) =+11 10