100% found this document useful (1 vote)
5K views285 pages

DLCA TechNeo

Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF or read online on Scribd
100% found this document useful (1 vote)
5K views285 pages

DLCA TechNeo

Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF or read online on Scribd
You are on page 1/ 285
Ae ce Be Digital Logic & Computer oe TTEL Lf Architecture~ Sen 67> @ Tyee available on Flipkart® amazon SS Digital Logic & Computer Organization and Architecture (Code : CSC304) Semester III - Computer Engineering (University of Mumbai) (As per New Syllabus for Academic Year 2020-2021) Bharat Acharya Prof. Shrikant Velankar ME. (Electronics), F.LE., F.LE.T.E, CE. J - 2000. ee et atcha, (Chartered Engineer) Professor, ee Department of Electronics Engineering Vidyalankar Institute of Technology, Mumbai 400037 U. S. Shah Formerly, Lecturer Department of Electronics Engineering, Vishwakarma Institute of Technology (V.LT:), Pune. Maharashtra, India. -N ii Trance Mi Where Authors Inspire Innovation A Sachin Shah Venture Digital Logic & Computer Organization and Architecture Bharat Acharya Prof. Shrikant Velankar, U. S. Shah ‘Semester TH - Computer Enginceting, (University of Mumbai) lication may be reproduced, copied, or stored in a Copyright © by Authors. All rights reserved. No part of this pul eee recording, or other rettieval system, distributed of transmitted in any form or by any means, including pholocoPy, clectronic or mechanical methods, without the prior written permission of the publisher. “This book is sold subject to the condition that it shall not, by the way of trade oF otherwise, be lent resold, hited out, or ‘otherwise circulated without the publisher's prior written consent in any published and without a similar condition including his condition being imposed on the subseque form of binding or cover other than which itis nt purchaser and without limiting the rights under copyright reserved above > Edition : August 2020 Disclai this book is presented solely for educational purposes. The Book is prepared as per the latest syllabus copy received by various Engineering Institutes affiliated to University of Mumbai. Due to Covid 19 Pandemic, online teaching bas already started according to syllabus received. Although the Author and Publisher have’ made every effort to ensure that the information in this book was correct at printing time, the author and publisher do not assume and hereby disclaim any liability to any party for any Joss, damage, or disruption caused by errors or omissions, whether such errors or omissions result from negligence, accident, or any other cause. Any changes in latest syllabus copy will be notified on our website. [And supplement regarding the same will be provided/made available on our Website. Tech-Neo Publications is not associated with any University. ISBN 978-81-947354-9-6 Published by Printed at Mr. Sachin S. Shah & Mrs. Nayana S. Shah | Image Offset (Mr. Rahul Shah) Permanent Address Dugane Ind, Area, Survey No. 28/25, Tech-Neo Publications LLP Dhayari Near Pari Company, Sr. No. 38/1, Behind Pari Company, Khedekar | Pune - 411041. Maharashtra State, India. Industrial Estate, Narhe, Maharashtra, E-mail : [email protected] Pune-411041. Address For Correspondence < Tech-Neo Publications LLP 407-412, 4" floor, Decision Tower, Above Hotel Tiranga, Nr. City Pride Theatre, Pune-Satara Road, Pune-411037, Maharashtra State, Email : [email protected] ‘ Website : www.techneobooks.com Mobile : 9145531105 / 8668233261 India. Dear students, We are extremely happy to come out with this book on “Digital Logic & Computer Organization and Architecture” for the students. This book has been strictly written as per the syllabus. We have divided the syllabus into small chapters so that the topics can be arranged and understood properly. The topics within the chapters have been arranged in a proper sequence to ensure smooth flow of the subject. We are thankful to Shri. Sachin Shah for the encouragement and support that he has extended. We are also thankful to the staff members of Tech-Neo Publications and thers for their efforts to make this book as good as it is. We have jointly made every Possible efforts to eliminate all the errors in this book. However if you find any, please Jet us know, because that will help us to improve further. We are also thankful to our family members and friends for their patience and encouragement. Special Thanks to, Anuja Gote, Ashish Shekhar, Mohit Gujar ae — Credit Code _ Computer OF r tecture 3 ~ CSC304 Digital Logie & Computer Organization and Architect Pre-requisite: Knowledge on number systems [Course Objective : 1, To have the rough understanding of the basic structure and operation of basic digital circuits and digital computer. To discuss in detail arithmetic operations in digital system. To discuss generation of control signals and different ways of commiunication with VO devices. To study the hierarchical memory and pri Course Outcome : To leam different number systems and basic structure of computer system, To demonstrate the arithmetic algorithms, To understand the basic concepts of digital components and processor organization, ‘To understand the generation of control signals of computer. To demonstrate the memory organization, ae To describe the concepts of parallel processing and different Buses, Module} Detailed Content ‘Hours| 1 Computer Fundamentals 3 1.1 Introduction to Number, ‘System and Codes 1.2 | Number Systems ; Binary, Octal, Decimal, Hexadecimal, 1:3 | Codes : Grey, BCD, Excess-3, ASCII, Boolean Algebra, Latle Gules : AND, OR, NOT, NAND, NOR, EX.OR Overview of compute organization and architecture 9) | Basic Organization of Computer and Block Lever {unetional Units, Von- Neumann Moda a - nn , (Refer. chapters 1,2, 3 and 4) Detailed Content Data Representation and Arithmette algorithms Binary Arithmetic : Addition, Subtraction, Muli BCI Ati Oper Booths Multiplication Algorithm, Restoring and Non-restoring Division Algorithm, (Refer chapter 5) TEEE-754 Floating point Representation. Processor Organization and Architecture Introduction : Half adder, Full adder, MUX, DMUX, Encoder, DecodertIC level). Introduction to Flip Flop: SR, JK, D, T (Truth table), Register Organization, Instruction Formats, Addressing modes, Instruction Cycle, Interpretation and sequencing. (Refer chapters 6, 7 and 8) ‘Control Unit Design Hardwired Control Unit : State Table Method, Delay Element Methods. Microprogrammed Control Unit : Micro Instruction-Format, Sequencing and execution, ‘Micro operations, Examples of microprograms. (Refer chapter 9) ‘Memory Organization Tntroduction and characteristics of memory, Types of RAM and ROM, Memory Hierarchy, ‘level Memory Characteristic Concept, locality. of reference, Design problems based on Interleaved and Associative (Refer chapter 10) ‘Cache Memory = ‘mapping techniques, Cache coherence and write policies Memory. [Principles of Adyanced Processor and Buses data hazards, branch hazards, (Sa fBasic Pipelined Data path and control, data dependencies, delayed branch, and branch prediction, Performance measures-CPl, Speedup, Efficiency, throughput, Amdhal’s law. fal: Flynn's Classification, Introduction to multicore architecture troduction to buses : ISA, PCI, USB. Bus Contention and Arbitration, (Refer chapter 11) oo 666 oo oo 6 Combinational Logic Design .. ‘Number Systems Codes.. Boolean Algebra and Logic Gates Overview of Computer Organization and Architecture. Data Representation and Arithmetic Algorithms... 5-1 to 5416 6-1 10637 Flip-Flop: Processor Organization and Architecture... Control Unit Design. Memory Organizatior 10-1 to 1028 Principles of Advanced Processor and Buses... 11-1 t0.11-28 Number Systems University Prescribed Syllabus Computer Fundamentals 1.1. Introduction to Number System and Codes 1.2 Number Systems : Binary, Octal, Decimal, Hexadecimal: 14 12 13 14 15 16 17 18 19 1.10 Binary-to-Decimal Conversion 1.11. Decimal to Binary Conversion. 1.12 10ctal to Decimal Conversion. Introduction — Q. 1.1.1 Whatis a Number System ?.. 1.1.1 Representing a Number ‘Types of Number Systems Decimal Number System Binary Number System. 4.4.1, Binary Number Formats ‘Octal Number System. Hexadecimal Number System Cs 1.6.1 Advantages of Hexadecimal Number System, Relation between Decimal, Binary, Octal and Hexadecimal Number Systems. Other Number Systems... Number System Conversion. 4.10.1 Binary to Decimal Conversion by Positional Notation Method 4.10.2 Binary to Decimal Conversion by Doubling Method. 4.41.1 Steps for Decimal to Binary Conversion for Integer Part 4.41.2 Steps for Decimal to Binary Conversion for Fractional Part... ME RTED NU = 2. (2), Dec, 16, 4 uarks UEx. 1.11.3] UEx. 1.11.4) vex. 1.11.5 [CRORES - a Number Systems 1-2) TB pigtatnogies. cOA qwu-sem. s-Come) ( ex. 1.12.2 KUERTEN 4.13 Decimal to Octal Conversion ; ~~ 4.481 Steps for Decimal to Octal Conversion for Integer jon of Fractional Part. 4.48.2 Stops for Decimal to Octal Corwersi 4.14 Octal to Binary Conversion Ex. 1.142, 4.45. Binary to Octal Conversion 4.46 Hexadecimal to Decimal Cor 4.17 Decimal to Hexadecimal Conversion. ‘eps for Decimal to Hexadecimal Convers ‘Steps for Decimal to Hexadecimal Convers version. a ign of Fractional Patt.. UEx. 1.17.1 ex. 1.17.2 ECR ues. 1.17.3 TEESTOMENECROET vex. 1.17.4 DECREE vex. 1.17.5 PEERS 1.18 Binary to Hexadecimal Conversion 1.19 Hexadecimal to Binary Conversion.. 1.20 Octal t Hexadecimal Conversion UEx. 1.20.2| UEx. 1.20.3 1.21 Hexadecimal to Octal Conversion. Vex. 1.21.2 [ERT SERTTITETY 1.22 Decimal into Radix r Conversion. TSMECRD MU. 1(c), Dec. 14,4, 0. 1(b), May 17, 2M UEx. 1.22.2 TIUECORTS WEENIE .. DISSE ZED iu - 0. 1(a). Dec. 16.1 Mark B 1.23 Radix r to Decimal Conversion UEx. 1.23.1 [UEXORTOMIENEEN 1.24 Binary Arithmetic. 1.24.1 Binary Addition 1,242 Binary Subtraction 1.25 Representation of Signed Numbers...... 1.25.1 Sign Magnitude Form... 128 128 A 1.252 Representation of Signed Numbers using 1's Complement or 2's Complement Methoa 1.25.2(A) 1's Complement of a Binary Number F 1.25.2(B) 2's Complement of a Binary Number . 1.25.3 Binary Subtraction using 1's Complement Method Tecl-Neo Publcations....Where Authors inspire innovation Digital Logic & COA (MU-Sem. 3-Comp) (1-3) Number Systems 1.25.4 B inary Subtraction using 2's Complement Method. vex. 1.25.6 DECOR SEES ex. 1.25.9 LUSTRE... Ex, 1.25.10 [IUESCRTORUEY MERGE. Vex. 1.25.11 [IRORTO RE EERE .... Ex. 1.25.12 [IEICE ERIE... PIE SREL MU =O. 1(c), Dec. 18, 4 Marks] 4.26. Binary Multiplication 1.261 Binary Division. 1.27 Octal Arithmetic. 1.27.1 Octal Addition. vex. 1.27.2 TERIOR 1.27.2 Octal Subtraction. 1.27.3 Octal Subtraction using 7'S Complement Method.. 1.27.4 Octal Subtraction using 8's Complement Method .. 4.275 Octal Multiplication... UEx. 1.27.6 Ex. 1.27.7 DUCTUS 1.28 Hexadecimal Arithmetic... 1.28.1 Hexadecimal Adcition. (aM PLEM MU - 0. 1(q) Dec. 14, 2 Marks UEx. 1.28.3 1.28.2 Hexadecimal Subtraction... 1.28.3 Hexadecimal subtraction using 15's complement. 1.28.4 Hexadecimal subtraction using 16's complement Chapter Ends.. ‘Tech-Neo Publications... Where Authors iaspire innovation =A SACHIN SHAH Venture Digital Logie & COA (MU-Sem, 3-Comp) mtd INTRODUCTION ‘The number system is used for representing @ quantity or information in digital electronics, ~ A umber system refers to a mathematical representation of the numbers by a set of digits or symbols. Every number is ‘represented by the positional notation of the digits ~ A nnumber system can be classified as: @ Non-positional number system : In a non-positional number system, a digit of a number does not indicate any significance of its position and weight; eg. Roman number systems. Non- ‘Positional number systems ae dificult to use. @) Positional number system : In a positional number system, the position of every digit of a number indicates the significance ‘or weight to be attached to that digit €.g. decimal number system, Digital electronics systems are positional number systems. ‘They ‘are widely used in computers, microprocessors, data processing, medical instruments, RADAR, navigation ete, %& 1.4.1 Representing a Number In any oumber system, every symbol in the number is called as.adigit. ~The leftmost digit ofthe number has the greatest positional ‘weight among the remaining digits in that aurmber, I is called as the Most Significant Digit (MSD). ~ The rightmost digit of the mumber has the least positional Weight among the digits in that number. It is called a the Least Significant Digit (LSD). ~ Anumber is formed by the collection of digits, A rnumber has two parts: Number Sytem ‘number decimal or radix point base or radix of the number system rnumber of digits in fractional part = numberof digits in integer part Least Significant Digit (LSD) Most Significant Digit (MSD) 0S Gord psd aa = The digs in the ieger part will have weighs that ay ey rapa ‘of base (b) and the digits in the fractional wall ave weighs thar are negative powers of bate 10 Definition : The base or radix (b) of the number systens is the total number of digits in that number systenn. Example, (© anomie yt represents digit 0 and I then he be of that aye 2 i) emer pa pena then the base ofthat sytem 10 Ina umber sytem, the ares vale ofa dig son es than be ba The vale of numer isthe sum of produts ofthe dg of that umber ih er conespondig pion wee ‘Te it gto the eof the dene point har awe of unity or b°. The second digit to the left of the decimal Point has a weight of b' and the third digit to the left has a weight b? and so on, ‘The first digit to the right of the decimal Point fas weight 8, the second digi tthe sig of oe Point has weight b? ang $0 on. Thus, each di bomber representa fern mane eric TeferFig Di 0, 1,2,3,4,5,6.7,8,9 ww o Most Significant Digit ventas Signeant Digit (MSD) : pst «S0). (@) _Integerpan—(&) Fi ~The fractional partis separated from the decimal point (2) or radix point. The digits on the lft side ofthe radix point form the integer Part of the number and digits on the right side of the radix point form the fractional part of the number. ~ Thus, a number can be represented as : Integer Part Fractional Part dh2 Gon 3. hon Oo [2] ds deg and MsD t . LsD Decimal or radix point + a4) T 2 ' dab ab Number dy T t op a 44] 4-2} [3] & t UY 1 ay’ | Decimal or raat point oat” ab" ap" at ase ordi (ADFig. L.1.1 : Positional weights of a number ‘The vale of the umber shown in Fg 11.1 canbe computed as, GX HDD 4G xbh eqns FOE ODE xO xb Tech-Neo Publications» Where Authors A SACHIN SHAH Vestre Digtal Logie & COA (MU-Sem. :Comp) “Thus, he value of each digit in a number can be determined sing () Thedigit Gi) Position of the digit Base ofthe number system >” 1.2 TYPES OF NUMBER SYSTEMS = The base or radix of the number system is the total number of digits used in that number system. eg. ifa number system represents the digits O and 1 then the base of the system is 2 = Depending on the basis, the different types of number (Refer Fig. 1.2.1) are: (1-5) Number Systems [E_(WV) Hexadecimal number system. = ‘The Hexadecimal number system is used in microprocessor systems. The hexadecimal number system has base 16 (sixteen). = It represents the digits 0, 1, 2, 3, 4, 5, 6,7, 8,9, A. By CDE, 1.3. DECIMAL NUMBER SYSTEM 1. Decimal number system is the number system that we use in ‘our day-to-day life Decimal numbers have ten digits : 0, 1,2, 3, 4, 5, 6, 7, 8 and 9. 3, Base : The base of the decimal number system is 10. 4, The decimal number digits and their values are shown in Decimal number sytem Table 1.31 Binary umber system Table 13.1: Decimal number digits and their values Octal pumbersystem Decimal digit [ Value | Radix or base Hexadecimal number system 0 0 10 1 1 10 Number systems 2 2 10 3 3 10 £ t 1 4 4 10. Decimal Oct] [Hexadecimal 3 3 10 ftumber | | number | | number | | "number ‘system | | system | | system yotem, 6 6 10 Tt a 7 7 10 Base 101] [[Base2] [[eases] [f Base 16 8 8 10 T T [eee] T 9 9 10 Dole] [7 Dot 5. The minimum vale digit is 0 (zero) and the maximura valu os || en || 07 | Lo-ean “<=. valse (0ha)Fig. 1.2.1: Types of number systems [= ()_Decimal number system ~The decimal number system has 10 symbols or digits : 0, 1,2, 3, 4,5, 6, 7, 8 and 9. As it comprises of ten digits it is called as decimal number system. = The decimal number system represents ten digits (0 to 1), 0 the base ofthe system is 10. [55° (i) Binary number system. = The modem computers use binary number system for performing operations. = A binary number system uses two symbols 0 and 1. Thus, the base of the binary number system is 2. [ES Gu) Octal number system = The octal number system has 8 digits: Its base is eight (8). — Thecctal number system was used in mini-computers. 2, 3,4, 5, 6 and 7 TTech-Neo Publications. Where Authors inspire innovation 6. The positional value of each digit can be determined by its relative position or place in the given number. This positional ‘value of the digits is called as weight. 7. Thus the decimal number system is a positional weighted system. ic. the position of the digit with reference to the 1.7 RELATION BETWEEN Quinary number 5 0,1,2,3,4 DECIMAL, BINARY, OCTAL system ‘AND HEXADECIMAL NUMBER aoa ‘numbers 6 0,1,2,3,4,5 ua oe sy: MS ‘Septenary number 7 0, 1,2,3,4,5,6 ‘Table 1.7.1 shows the relation between decimal, binary, octal sya, : “ spel pee een Oaalmaba | 8 pe aaa SET Ta 17 oe i Octal Hexadecimal Decimal sumber 10 |0.12345,67.89 Heat |e | SOS | mar acto ||| eae (base 10) (base 2) (base 8) Undenary number u 0, 1,2, 3,4, 5, 6, 7,8, 9, 0 0 0000 oO o system 1 0001 1 1 4 Duodenary or 12 0, 1,2, 3,4, 5, 6,7, 8, 9, 0, B 4 | on _} 2 oven nombre 3 0011 3 3 Hexadecimal s [OuRRAROTADA “ 0100 4 number system, B.GDEF Fe es Plies Ww eb ip a Bs IB digital Loge & com tmu-Sem. 3-Comp) (1-10) ig: 1.8.1 shows the weights for different positions in a number system with radix r MSD Intogor part Number Fractional part LSD 4] [5] [a] [ + I WAAC Positional weights Radix point (A9Fig. 1.8.1 : Weights for different positions in a ‘number system with radix r ‘The weight of every position o the let i one power of r seater than he weight of the digit tits sucesive ight From Fig. 18.1, a number canbe represented as, N= dt'sdP 42d redhead r! +d aed ed ye 1.9 NUMBER SYSTEM Step1: Write the given number CONVERSION v 4. The decimal number sem i inpomntteewse is || SHPM: With postion weight foreach dig universally used to represent numbers and quantities y 2. The digital systems operate with binary data. Hence, it Step IN: Multiply each digit in the given number with its esse o convert the decimal number to binary betes i. applied to a digital system and convert the binary number to enn’ WeiBh {0 get product of digits or ‘decimal for displaying the result on. the output devices. ‘Positional value. 3. If there are many binary numbers of large bits then it is v ‘convenient to express the binary numbers in terms of octal or StepIV: Find the sum of products to ‘obtain the decimal he numbers. decimal number ‘suivlent ofthe given binary number 4, Hence, we need to convert the binary numbers to octal and vice-versa or we need to convert the binary number hexadecimal and vice-versa Ex 104 Number > 1.10 BINARY-TO-DECIMAL CONVERSION To convert a binary number to a decimal number, two methods : the ig (@ Positional notation method Gi) Doubling method % 1.10.1 Binary to Decimal Conversion by Positional Notation Method ~ Positional notation method is a way in which the positon ach digit has a place value or positional value. The rune, is expressed as the sum of products of the digits of ty number wit their corresponding positional values or weigh, = Steps to be followed to convert a binary number toa» equivalent decimal number areas follows : ‘Conver the following number. Show al steps (101101.10101),=( jy. Ans. :(Refer Fig. Ex. 1.10.1) so Stop: Blnay number = [4 To ap a tPe,1 foie ‘Step: Positional wigs = [5] [3°] [39] [5° 7 7 Stop HI: Digit xwolght =. 1.2" |[o.2" [1.29] Step IV: Sum of products = +L] + [o5]+[o}sferzspfo}} {oas] SE ee ‘Thus, _(101101.10101), = (45.65625),, TTech-Neo Publications... Where Authors inspire innovation (45.65825)49 decimal equivalent (At9Fig, Ex. 1.10.1 ot SACHIN SHAH Meso - I oigtat ogi & COA (MU-Som. 3-Com) (tt) Number Systems Ex. 1.102 Do the following conversion (1101.0011); =( io ‘Ans. : (Refer Fig. Ex. 1.10.2) cs 1s) Step :8inay number [4 ae 7 I T TT ‘Stop II : Positional weights -- | 2° | | 2? | | 2° 2 Esl i ‘Step IIL: Digit x weight =| 442° || 442° |] 012" | 42° x2 *|] 02° |] 4.2" |] 4.2 rit ee ee Stop tv: sumotproaves —~ [e]+[4]+[o]+L1 OC SSeS ee %5 0.175 — ee (13.1875)9 decimal equivalent Ans. (noFig. Ex. 1.10.2 Thus, (101.001), 13.1875) 1.10.2 Binary to Decimal Conversion by | » 1.11 DECIMAL TO BINARY Doubling Method CONVERSION = Doubling method i simple than positional notation method, | 1+ This method of decimal to binary conversion is aso called as Tt can be used for converting large binary numbers. The given Double Dabble method or Dibble Dabble method. . tumber is a base of 2, hence doubling can be used. 2, In this method, the integer part of the decimal number is — Stepe to be folloned to convert a piven binary number to | coaverted to binary using sucessve division by 2 and the cepted pall vary anal part of dca umber convert iy so sng desing et using suocessive multiplication by ep A We Se Naay em 3. Inthe successive division by 2, the integer partis divided by 2 tll the quotient reaches zero. The remainder to division is Step 11: Beginning with MSB, multiply the bit by 2 and add da BS Tp ohn ihe oelvalan thoxy soeper, te te toa tothe next bit tothe right remainders are read from bottom to top ¥ 4. In successive multiplication by 2, the fractional part of the ‘Step III: Repeat step II till all bits are done. decimal number is multiplied by 2, till the fractional part of Ex 1.103 the productis 0. Convert (10101), = (gto decimal, 5. The equivalent binary fractional partis obtained by reading ie the integers from top to botom, ie, MSB to LSB. Finally, ‘Ans. : (Refer Fig. Ex. 1.103) ‘the result is combined to obtain the equivalent binary number. cise tse ore Wolter % 1.11.1 Steps for Decimal to Binary binary number T Conversion for Integer Part creatdterebn DEPT OFS Sep Ts Wie te desing number, Stop Ill: Multiply by 2 —»[232+1=5 ] * || Step i: Divide the decimal number by 2. The remainder ‘and odd th nox Bk obtained isthe LSB ofthe binary number. v Stop 1: Muti by 2 —=| Step 1: Divide the quotient obisined from step Tl. Sani note ‘Emandor one is te scond LSB of he nas ‘Step V : Multiply by 2. —*]40x2+1= 21 4 ieee ‘and od th next Bt Step IV: Result decimal equivalent ...Ans. no. Henger divisibi by2. (uanFig. Ex, 1.10.3 Step: eet eninoe ‘obtained from the division is the nd af the binary number. The equivalent Taos, GNIe, = GH), umber is read from bottom to top. ad ‘Teeh-Neo Publications... Phere Authors inspire innovation ‘uA SACHIN SHAH Venture Module Number g, (1-12) Eten, git Logic & COA (MU-Sem. 3-Comp) . Ex. 1.111 cma Convert decimal number 199.375 into binary. nt_Remainder Baso| Quotent_ Remain a 2 a i wersion of integer be ©D Step 1: Decimal to binary com BF pan 2 | 13 0 & Firstremainder (LSB) Top oP ST pvcessive division by 2. , te i ST oe Senin 3 Base Quotient Remainder 2 03 ‘Third remainder 5 : & I 2 Fourth reminder = 2 |. ‘Filth remainder (MSB) a 2 99__1(-SB) Bottom Read up 2 49 1 (11010), 2|[ m1 %_ 1.11.2 Steps for Decimal to Binary 25 | ERs Conversion for Fractional Part 2| 6 0 ‘Write the fractional decimal number. 2 3u.0 v 2 1 ‘Thus (199), = (11000111), Step I: Multiply the fractional decimal number by 2 and ee ‘write the carry in integer part. The first carry is the usp) MSB. Read up Step: Matiply he factoga > Step Ul: Decimal to binary conversion of factional party em iseepltandrecnd acne the product obtained successive multiplication by 2. Y Step TV: Repeat steps 1 and Il tll the fractional pat of the oduct is zero 0. The last carry is the LSB of the guivalent binary number. The equivalent binary fractional partis obtained by reading the integers from top to bottom ie. MSB to LSB. Example, (O3125)9= (Jy (Refer Fig. 1.11.1) Decimal Base Product Carry fraction (Integer-part) N25 x 22 og 03125 x 2= 0625 (mse) 062 x 25 125 1 Vee ea down 02 * 2= 0g 0 OS x 25 40 1 (LSB) (n29Fig. 1114 (03125) = O.0101), (Refer Fig. Ex. 1.11.1) Decimal Base Product Carry fraction (Integer-part) 0375 x ‘2 = 075, 0 (MSB) a cane (29 Fig. Ex. 111 0375, = Oo, D'Step IIL: Combine the answers obtained in step 1 and Il, (199.375) = (11000111011), Ube 1.12 TERT Pas Conde mimes S52nibinay, Z ans. : "D step 1: Decimal to binary conversion of integer part 6 successive division by 2 Tee Pela Whe Ath ig intiag A SACHIN SAH Vest [Be] bigta Logic &. COA (msom.2-Comp) Base Quien Remainder a_|iss 2 [n__ 1asm 2 is 2 fe 0 2 |e 1 Read up 2 [4 1 2 o 2 0 === 10180) (s5,, = aoon101), ©} Step II : Decimal to binary conversion of fractional part by successive multiplication by 2. (Refer Fig. Ex. 1.11.2) Decimal Base Product Cary fraction (nteger-part) os3 x 2 = (mse) J To ot 068 x 2 = 1% 1 i 4 022 x 2 = 064 ° od Rood down os x2 = 14 om «2 = 056 188) (1a26)Fig. Ex, 1.11.2 (0.0101), (19) Number Systoms Base Quotient Remainder Module 2 | wn 1 yh 2 | 16 1 ase) ° o o ° ° Read up 1 5 1 1 af 4 0 t 1 (MSB) (1473), (10111000001), 2 step 1: Decimal o binary conversion of factional par by successive multiplication by 2 (Refer Fig. Ex. 1.11.3) Decimal Base Product Carry fraction (integer-part) 04s x 2 = 09 ‘o(MsB) a, os x 2 = 18 1 Read op x 2 = 16 i |= © Step UI: Combine the answers obtained in step I and I ae wai © on bay (455.3), = (10011011.0101), (aznFig. Ex. 1.113 SER EY U0. 110), ay 18.1 art} (045) = O11), © Step IIL : Combine the answers obtained in step T and step I. (147345) = —(10111000001.01110), © step 1+ Decimal to binary conversion of integer part by successive division by 2. A SACHIN SHAH Veature "Teck: Neo Publications... Where Authors inspire innovation eshitaphcoomen Sanh UEx. 1.11.4 IIURTOS ‘Convert 214,32), 10 binary, Dan "© Step I : Decimal to binary conversion of integer part by successive division by 2, Pe Base Quotient Remainder 24 107 33 1 26 1 sp) » fpf» » >> Read up FFA 214, = oss) 1010110, ©D Step TI : Decimal to binary conyersion of fractional part by successive multiplication by 2. Decimal Base Product Carry fraction (integer-part) 032 x 2 = 064 64 O(MSB) ————_-. os x 2 = 128 4 028 x 2 = 056 ° = ose x2 = 4142 1(L88) ayFig. Ex. 1.11.4 (032), = (0.0101), © Step IMI : Combine the answers obtained in step I and step TL 21432), = (10101100100), 7} (1-44) Number UEx. 1.11.5 DEORE Convert decimal number 576.24 Into binary. Z ans. : © Step I: Decimal 0 successive division by 2. nary conversion of ie py Base Quotient Remainder 2 | 5% 144 9 4 2 benee 1 (MSB) (576) = (1001000000), lel *D Step It: Decimal to binary conversion of fractional pat by successive muliplication by 2. Decimal fraction Base Product Carry (integer-part) ‘om ze. o(MsB) 184 (aig. Ex. 1115 (024, = (0.0011), 1(LsB) ‘> Slep I: Combine the answers obtained instep and step (5762, = _(1001000000.0011), Techs Neo Publications... Where Authors inspire ineration == SACHIN STU Vet (a igi Logic & COA (Mu-Sem.3-Comp) (1-15) Number Systems 4 1.12 OCTAL TO DECIMAL CONVERSION Step I: Write the given number Foreg. 134.06 v Step: Write the positional weights for each di (Refer Fig. 1.12.1) Mo Re Ex. 1424 ‘Convert the following number into its equivalent decimal number (show step by step process of conversion). () @572), @) 458.54), Hane: (1) (9572): Oefr Fig. Ex 1.121089 wise ts a cee Db ‘Step It s 8 8. | point Posional weighs —T— Step tl = —*} 3x8" } | 5x8) 2x8" Td k= weit ; c tLe} Ls swpv —~[ 12] [20 + [ozs Psion! weighs OT se 20 0 (von. 124 1 ieee OR, Sup 1: Maliply cach dg in he given suber with (23025), dncimal cquivalont Ans. comesponding weight 10 get product of digit of : positional value, (Refer Fig. 1.12.2) (1aeayFig. Ex. 1.12.1(a) v Thus, (357.2), = (239.25) Octal number ‘ (2) (458.54)o ‘ ae] - bee (Refer Fig. Ex. 1.12.10) Lid 0 ection Py rs lle watxwect | spy 7 a [ERE Be8 hunber ee Lobel vont, 1122 —_ 7) Paws UT Le le ’ wou [oa] [eal) [ok] [Ea] faa || Daten supp IV: Find the sum of products to obtain the decimal ‘ sory +280 f[o]-[ 2 . bah] equivalent of the given octal number. ee sa eae = a (19406) = (169 + x8!) + (4x09) #0) + 6x0") Ba nate Sam of proce (304.6875) 49 decimal equivalent ...Ans. 13405, = 4444-04 009075 § a (aayFig. Ex, 1.12.1(b) (134.06), = (92.09375), ‘Thus, (458.54), = 04.6875),» Teck: Neo Publications... Where Authors inspire innovation Anca ace Di im, 3-Col Number g, (1-16) igital Logic & COA (MU-Sem. 3-Comp) RUSSRREEY MU - ©. 1(0), May 16.1 Mark (Convert (532.125), into decimal. TZ ans.: (ReferFig. Ex. 1.122) Step I: Binary number = Stop IL: Positional weights -» ‘Step IIL: igh x weight = Step :Sumefpmaies sre fone] =e oats (346.16601),9 decimal equivalent ...Ans. Thos 532129,- 46140, (MOFig. Ex. 1.122 Divide the quotient obtained from step IL. The MIS DECIMAL TO OCTAL remainder obtinedi the second SB of sot CONVERSION Shiba, ~ To convert 4 decimal number to an equivalent octal, the v stocaee dee Cecimal umber is converted to oct by | | StepIV: Repeat division by 8 Gill quotient becomes zero, ie, wotient is no longer divisible by 8. v ‘uliplication by 8, Step Vi The last remainder obtained from the division isthe ~ In the successive division by 8, the integer partis divided by MSB of the octal number. The equivalent octal 8. ll the quotient reaches zero. The remainder to the umber is read from bottom to to . Example : (128),5 ~ Toobtan the equivalent octal integer, the remainders are read from bottom to top, ‘Base Quotient Remainder ~ In successive multiplication by 8, the fractional part ofthe tf Gfeital number is mulipied by 8, he factional pat of 8 | 16 0 8B) rst emainder Be products zr, ° Readup | Octal number *. MSB to LSB. Finally, the He 42 (usa) ‘esult is combined to obwsin the equivalent octal number: Thus, (128) = 200, 7%. 1.13.1 Steps for Decimal to Octal 7% 113.2 — Steps tor Decimal to Octal Conversion for Integer Part Conversion of Fractional Part Step: Write the decimal number, Step: Write te tractional decimal umber v Step: Divide the decimal number by 8. The remainder ‘obtained isthe LSB of the octal nutnber, v Step: Multiply the traci tonal decimal number by 8 and integer part. The first carry is the Step Tech-Neo Publications... Where duthrs spires anortig [al igtat Logic & COA MU-Som.3-Comp) (1-17) Number Systems Repeat step M1 and TT cll the fractional part of the product is zero, The Inst cary is the LSB of the Equivalent octal number. The equivalent octal fractional part is obtained by reading the integers from top to bottom i.e. MSB to LSB. Example : (0.3125)qy=(? )y (Refer Fig, 1.13.1) ‘Step IV: Decimal Base Product cary fraction (nteger-part) 0.3125 x 8 = 28, 2(MSB) Road down os x 8 = 40 488) (1aepFig. 1.13.1 Thus, (0:3125)9= (024, (Convert (126)9t0 otal © ans.: UEx. 1.13.3 DECREE Module Convert decimal number 199.375 into octal 1 Fe @ ans. ©D Step 1: Decimal to octal conversion of integer part of given number by successive division by 8 ‘Base Quotient Remainder 8 | 19 8) [owe eau use) Number 199) = BOM, ©D step IK: Decimal to octal conversion of fractional part of given number by sucesive multiplication by 2. (Refer Fig. Ex. 1.133) © Step I + Decimal to octal conversion of given umber by Decimal Base Product | Carry successive division by 8. fraction (integer-part) Base Quotient Remainder sists x0 + 3 | a | 6 8 Eauivalent (Fig. Ex 1.133 8 1 7 Faas ‘octal 0375) = 03) becmom 1 (8) number | © step Ht: Combine the answers obtained instep I and I Thus, 2H yy = (178), (199.375)5 = (073), Ex 1132 Conver the following number, show all the steps: 247)o = D1 ans.: © stepI: Decimal to octal number conversion of given a Pa octal oon of integer part by number by successive division by 8. iM . Base Quotient Reminder a | Base Quotient Remainder (ts) s | 27 (isB) Read Read up ¢ Equivalent octal 8 | 3 1 . a ne 3 | 3 6 3 (MSB) AAD» = 6M - “A SACHIN SHAH Venture "Feck-Neo Publications... Where Authors inspire innovation y SS Number Digital Logic & COA (MU-Sem. 3-Comp) (1-18) Sit © Step IT: Decimal 10 octal conversion of fractional pay © Step 11+ Decimal to octal conversion of factional pat by | © Step successive multiplication by 8 b Sucessive multiplication by 8 t cary Decimal Decimal Base Product fraction Me Prost cam fraction (integer-par) 033 x B = 264 2(MSB) Om x 6 = 192 10M88) Ss ——__ -——————“_ 04 x 8 = ap 2 om x 8 = 79 7 ne | > TF _| Reas om x 8 = 0% 0 03 x 8 = 269 © 2 | dom -—_——_ a | 09% x8 = 768 7(sB) 088 x 8 = 7.04 7 (LSB) Fig. Bx 1135 eu0Fig. Be L134 7 (033), = (02207), et © Step: Combine the ansvers ob kidep ries > Step I: ‘Combine the answers obtained in step T and I. as1.33), (227.2200, ©1620 = citea.i7Z, Decimal to octal conversion of integer part by ‘successive division by 8, Base Quotient Remainder 8 | 576 sb) (Read up) cusp) 676), = (1100), "Step: Decimal to octal conversion of integer part by successive division by 8. Base Quotient Remainder 8 | 1473 8 | iss 1 Teali-Neo Publications... Where Authors inspire novation =A SACHIN SHAH Vest Digital Logic & COA (MU-Sem. 3-Comp) (1-19) Number Systems. D Step I: Decimal to octal conversion of fractional part by Module so use. successive multiplication by & Cc es aweal Decimal Base Product any sot —-[apepe|- [7112 fraction (integer-part) Octal number t ee ee 045 x = step —+| 100] 101 | 110 | PO") 411 | ont | o10 er & oe 3K binary 1° ‘equivalent (100101110.111011010), Equivalent binary number Ans. (sag, LA Ex1.144 Convert (670.17) ito binary. TW ans.: (Refer Fig. Ex. 1.14.1) 8% octet uber “SP (Fig, Ex. 1136 Step! —+}/ 6] 7] 0] - 147 See muni Ho ; . AS), = (0.3463), 1 q © Step I: Combine the answers obtsined in step and T. stop —~[+10] 417] 000 pont] oot] 419] (1473.45) = (2701-3463), ay bi 1.14 OCTAL TO BINARY swag eben Bom CONVERSION (wasoFig. Ex. 1.14.1 ‘Steps to be followed (Refer Fig. 1.14.1) Thus, (670.17, = (110111000.001110, Sup: Wile given octal sumbe 2.456732 v sep: Replace eich oc digt by is Sit binary equivalent ‘Octal numbers and their binary equivalent numbers step! etal igh | 3 Bt euivalent binary number Ot nunbor ‘Base 8) Base 2) a Step it —+] 101 | 011 | 010 | point} 001} 010] 104 ° 00 3b binary pom os] or] 1 ar ‘equivalent, § <-> 10 (1o1011010.001010101), 2 Binary equivalent number Ans. 3 ou 4 100 ie (sig. Bx. 1142 5 110 ‘Thus, (632.125),= (L01011010.001010101),, 6 7 m1 "Fed Neo Publications... Where Authors inspire innovation Tal SACHIN SHAH Venture f) 1-20) Huber Digital Logic & COA (MU-Sem. 3-Comp) t 1 1.15 BINARY TO OCTAL CONVERSION Step: Write the given binary number yi- v Step I: Starting from cithér side ofthe binary point, form groups of3 bts. “oy Step IU : Replace each 3 bit binary group wit ts equivalent octal number. —_| Example : (100101111.010111011), (Refer Fig. 1.18.1) se. mse c — > Stpt:Binaryrumber —- [aT oT] |B at TUT of 4] ] apo] aya Binary point Seoncoumeatsous [00 [vot | ow [-[ ow [wm | on . TT T T Step i: Octal Equivalent [4 Ts | 7 |-| 2] 7 | 3 ‘of bit binary number (457.273), Equivalent octal number Ans. (sig, 18 CoororniLooL101»), = 457.279, et) sa Lse. Convert (110101.101010), to octal t Binary number y Steet —f * ane. + etre Be. 1158: soy near “CLT TT TEP ie ‘Binary ae t | boi | Step! {]aJe geet goat Lo [Tn Don Binary number Gute sates “I bay Step = [5 3 ET 7 3 Step = Groups of 3 bits Oia Enunaiont EEE SE SY Stepm = I (53.73), Equivalent octal numbor =. (Octal Equivaiont digit youve: 13 (65.52), Equivalent octal number ...Ans. Wenig Be, 1.152 . (srg. Bx 1.18.1 Tous, LOLOLL.LLIOLD, = (63.73), an le Thus, (110101.101010),= (65.52), Ex 1.153 Convert (1O101101),=(_), Ex. 1.152 a »wing numbers, show all steps. Conpdert ae Pollonring nambens, 0 * (Refer Fig, Bx. 1.15.3) (O1011.111011),= (De 1 ans. : (Refer Fig. Ex. 1.15.2) we Te Tech-Neo Publications... Where Authors inspire innovation A SACHIN SHAD A —_—_— Number Systoms v Module Added bit 2 DY 1 tiny nunber sey Step IV: Find the sum of products to obtain the decimal a Digital Logic & COA (MU-Sem. 3-Comp) (1-21) alent of the given octal number. sept —> ofafofafo]s[+fo eq r j Binary number C-2B)y = (4x 16!) + (12x 164) +2169) ——— ] I + (11x16) (AC -2B)g = (64) + (12) + 0.125) + (0.0429) stop = —+{ 010 101 101 128), = Stan ot 3s L (4C-28)_ = C16 i i Ex 1.164 step = —+[ 2 3 5 Do the following conversion Octal equivalent CB -2),6> Ono dit uw (255), ‘Ans.: (Refer Fig. Ex. 1.16.1) Equivalent octal number ..Ans. laa eo (usoFig. Bx. L153 Gio z Hexadecimal Thus, (10101101), = 255), number | 1 1.16 HEXADECIMAL TO DECIMAL a 1 CONVERSION weights I sep ela ‘To convert hexadecimal number to an equivalent decimal | Dig x woight umber, the steps to be followed are: I Sept: Wie te greamnt sepv —+[to0e]+[ a2 + [es] SE OCs v ‘Sum of products ‘Step I: ‘Write the positional weights for each digit. = Gearrie ED (1224.125),9 decimal equivalent Ans. se ise. : cel fers cing. Ex 1.164 ate ‘Thus,(4C8.2),g= (1224.125)y9 L Be i462 Do the following conversion : (3A +2F).g= (29 aa ara DH ans. : (Refer Fig. Ex. 1.16.2) Positional weights C? sexadacns ruber?) (1asnFig. 1.16. ‘step! sea] - eeaer Fecal iY a7 nimber | Tf Step II: Multiply each digt in the given number with its ‘ - L aoe ading weight get product of digs or || atenai tp LS Let Te?) positional value. (Refer Fig. 1.16.2) ‘weights q I ‘Stop It = r =] 7 B me 10% 46 |S. - Hexadecimal number a Digit x weight ad 216 _ [5x16 ¢ 28 supv —o[@]+[o0] + [ras|oang] 1 ‘m [verbo | I wea 8 Goryess Tose a = x aac! | x16! 2axt6*| _Bxi6* | Dialtxweight (68.71),9 decimal equivalent ..Ans. 1216" Lettx16, (sig. Ex 1.16.2 Thus, GA-2P)g = GBT (wnsiFig. 1.16.2 A SACHIN SHAH Venture (5 gins conguson 2200 1 1.17 DECIMAL TO HEXADECIMAL CONVERSION To convert a decimal number to an equivalent hexadecimal umber, te integer part of the decimal number is eonverted to hexadecimal by successive division by 16 and the fractional part of the decimal number is converted to decimal by using successive multiplication by 16. ~ In the successive division by 16, the integer partis divided bby 16, till the quotient reaches zero, The remainder to the division is the MSB. To obtain the equivalent hexadecimal imeger the remainders are read from bottom to top. ~ In successive multiplication by 16, the fractional part of the ecimal number is multiplied by 16, tll the fractional part of the product is zero. ~The equivalent hexadecimal partis obtained by reading the ‘integers from top to botiom, i.e, MSB to LSB. Finally, the result is combined to obtain the equivalent hexadecimal ‘number. 7% 1.17.1 Steps for Decimal to Hexadecimal Conversion for Integer Part aii Number: Ya. 1.17.2 Steps for Decimal to Hexadecimay Conversion of Fractional Part ‘Write the fractional decimal number, v Multiply the fractional decimal part by 8 and yg the carry, in the integer part. The first cary is MSB. Step 1 Step I y Mulply the Fatonal part of the produc bing instep and record the cary. v pape ee an I be ft ptt products 2r0. The lst cary it the LSB of te equivalent hexadecimal number. The eave hexadecimal fractional part is obtained by readia the integers fom top to botom, i, MSB 10 LSB, Step Ht: Step IV : Example : (0.675), =? (Refer Fig. 1.17.1) Decimal Base Product Carry (Integer part) fraction . + ‘Step 1: Write the decimal number. 0.675 x 16 = 10.8 A (MSB) Y Step: Divide the decimal number by 16. The remainder obtained isthe LSB of the hexadecimal number Y Step III: Divide the quotient obtained fiom Step Tl. The remainder obtained is the second LSB of the Dpexadecimal number. ’ Step IV: Repeat division by 16, til the quotient becomes 20, Le. quotient is no longer divisible by 16 Sup V: MSB of the hexadecimal number, The equivalent : teste ‘number is read from bottom to top. "> Step: Decimal ‘to hexadecimal convenion of ‘4 Example : 2156) umber by successive division by 16, Base _Quotent__ Remainder Base Quotient Remainder 16 | 2156 P 6 | 12 16 134__ C firstremainder (LSB) —_——— age) 16 & 6 Sccond remainder Readup | 6 | 7 4@) t Read up Le 8 (sp) Papas 9 (sp) (2156);p = (B6C)e ‘Thus, (126), = (TE), [ech Neo Publications Where Author inspire aaoration A nd SACHIN SHAD Digital Logi & COA (MU-Som, 2-Comp) UEx. 1.17.2 DEORE ‘Convert decimal number 199,375 into hexadecimal system, © ans. : © Step1: Decimal to hexadecimal conversion of integer part Dy'successive division by 16. Base Quotient Remainder asp) ie sp) 16 |_ 199 Dw © Step II : Decimal to hexadecimal conversion of fractional part by successive multiplication by 16. (Refer Fig. Ex. 1.17.2) Base Product Cary Decimal fraction (ntoger part) 0375 x 16 = 6.00 6 (ass )Fig. Ex, 1.17.2 0375) = O.5)¢ © Step II: Combine the answers obtained instep and sep Tl. (1-29) Numbor Syotoms Docimal Base Product Carry frnetion (tntogor part) 045 + 102 72 7 (M88) 02 «1032 3 Road flown 02 02 se) (ii, Bx. 1.173 (045) = OTR) © Step IIL: Combine the answers obtained in step Tand step (1473.45)y5 (5C1.7333) 6 (UEMRETAT 1-0. 1(0) Doc. 16.1 Mark {Conver decimal napber 151.33 into hexadecimal system. 7 ans. : ©D Step: Decimal to hexadecimal conversion of integer past by successive division by 16. Base Quotient Remainder B) “P neten 151 (MsB) 16 16 ASD = Ore (199.375),. = (C7. 6 D Step I: Decimal to hexadecimal conversion of fractional Ues. 1.173 DEECRTOMOAERMIETA pant by successive multiplication by 16. (Convert (1473.45)i.into hexadecimal. (Refer Fig. Ex. 1.17.4) Decimal Baso Product Carry (Integer part) 1 ans. fraction © step: fexadecimal conversion of i + Bley L Decimal th esses en eee 0.33 x 16 = 5.28 5 (MSB) « by successive division by 16. Base Quotient Remainder ws 16 | 1473 3) 6 | 2 1 { -— 0.48 7.68 Reed w | 5 c Read up Read 5 (sb) rr Thus, 147 y = ECD 068 «16-1088 © A © Step I: Decimal 1o Hexadecimal conversion of fractional cts Jive multiplication by 16. 1 part by successive mullipl i 088 x 16 = 14.08 e (tsB) (Refer Fig. Ex. 1.173) (enkig, Bx. 1174 (033),9 = (OS47AB),, "Teal Neo Publications.onn-- Where Authors igpireinworaton TA SACHIN SH Veawass Bl vista ogi & con qu-sem 3.comp) "D Step I: Combine the answers obtained in Step I and VER 1.47: MUG. (a), Dec. 18, 1 Mark Convert decimal number 576.24 into hexadecimal system. Hans: (1-24) »y 1.18 BINARY TO HEXADECIMA; Number: CONVERSION Write the given binary number. —— v Starting from either side of the binary point, fan ‘groups of 4 bits. v Set beet gteeta crete ne || Seem: pone stk Mr oo see ene sia er ty rt As_|_ sis __ csp) I Read up asa) ‘Hexadecimal digit (Base | 4 bit binary equivalent (Base 19) : > oan "> Stép I: Decimal to hexadecimal conversion of fractional A 001 cm eee 2 wi ‘rection (tntegorpart) R ai 0% « 6 = 384, ‘3qMse) s e100 5 101 [ T 7 6 on10 oe xe =H 7 tt J T— | ress 8 1000 044 x 16 = 704 7 [san 9 1001 re A 1010 oo x 16 = 06 base) B 1011 oFg. Bx 1175 © 1100 + 0.24), = (0.3070), D 101 > Step II: Combine the answers obtained in Step 1 and a 110 Step I. E un (576.24) = (240.3D70)y Example :(DIONNROHHOD y= yy HB Binary number 1s8 Step: Octal umber —[ppTe ‘Step Il: Groups of 4 bits —+|_ 0010 EEL. “Carat ar Step Il: Replace each group by —s[ hexadecimal equivalent digit (001011111100,01101101), = 2FC.6D),, (nS Fig. 1.18.1 Tech-Neo Pulications.Where Authors inspire aooratiog A SACHIN SHAM Vest? Digha Loge & COA (MU-Som. 2-Comp) (128) Number Systeme ex. 1.18.4 Module Do the following : (101011.111011),= 2s cs Ls. 1 TD ans.: (Refer Fig. Ex. 1.18.1 Beasr seniee Reker FEEL TIED go, 9 of OTOL PLT ToT Binary number — H = Binary Added bis Ben step —+[ooro] 107s] [it 19]11 00 Groups ois TT LI stp —-[2 1 8 TT eT ¢ Replace each —- enasocima ene equivalent digit ¢ ‘Che Thus, (101011.111011),= @BEC), 1 1.19 HEXADECIMAL TO BINARY CONVERSION Steps tobe followed : (Refer Fi. 1.19.) © step 1: Write the given hexadecimal number.g. 3A9D.AOC © Step Il : Replace each hexadecimal digit by its 4 bit binary ‘equivalent. se iss. {Hexadecimal number Step!:Hexadecimal umber —» [SJAL9]O] ; [AOTC 1 low Hexadecimal re | pate Step il: Replace each hex cit [0014] 1010] 1009] r10%] - [1070] 0009] 100] by as 4 bi binary equivalent (0011101010011101.101000001100) Equivalent binary number Ans. (rng. 1.9.4 , (2A9D.A0C)y, _ = (0011101010011101.101000001100), Ex i109 Convert @A9:B4), to binary ans.: se Ls8 fans. (Refer Fig. Ex. 1191) (3 acta cane stepl: A abs Hexadecim _ L T T TL : ‘Step Il: Replace —=|1 00 0]1 010] =]1011]0100) each hex digt byits 4b binary quivalent (100010101001,10110100), Binary equivalent number Ans. (rag. Bx. 1.19 ‘Thus, (BA9.B4),, = (100010101001.10110100), oA SUCHIN SHAH Venture “Teck Neo Publications. Where Authors inspire ianoration Number S, » &l Digital Logic & COA (MU-Som. 3-Comp) elt 28) =e Ex. 1.20.1 ‘i 1.20 OCTAL TO HEXADECIMAL Convert (615.25), t0 hexadecimal. CONVERSION ans. : For converting an octal number to a hexadecimal number, we (Refer Fig. Ex. 1.20.1) MSB Use. Mh ih {Octal number ist coavert the octal number to binary cquvalent and then we first conven th fe wis ‘ohh ver the binary number to equivalent hexadecimal number. — Sone ser marta Octal number har Steps to be followed : Refer Fig. 1.201) Oca Step: Write the given octal number. qoolisPoRToAEap ta, 28.4613 Stop — 3B binary => v equivalent tl Step: Replace cach octal digit by its equivalent 3 bit . Poi inary number. Step —+ [oooioogitoq foros ca . Groupe of bits" T— T Step IT Staring from citer side ofthe binary point, form || stepiy —» [71] @ [> [Ts of bi Hexadecimal r0up of bits, i v (18D. 5445 StepIV: Replace each 4 bit binary group with its hexadecimal equivalent number ..Ans hexadecimal equivalent (aro Fig. Bx. 1.20.1 se Thus, (61525, = (8D.54),, octet number Step! 472 (Vex 1202 TERT Ocal number ise , Conver (670.17 ginto hexadecimal, Ans. Step 0, (Refer Fig. x. 1.202 3 Digit binary 909 in a quvalont step —- [Soodooogoory - oreo | sty rae P| ce TT | cctnumber Drs Hondecinal S12] | stopu goof equivalent digit 3B binary a (113.658), hexadecimal equivalent equivalent ‘number Ane Step ill — [000g Grote ot 4s“ (423.613), Step tv 1 Hexadecimal equivalent agit Where Authars inspire innovation (188. 30),6 Hexadecimal equivalent number AS (ATIPig. Ex. 1.202 This, (67017, = (N8.30),, st SACHIN SHAH Vet Digital Logic & COA (MU-Sam_3-Comp) (1-27) Number Systems UE. 1.203 REE Faample: RCAC Conver (832.1251 hexaecima cm sinman®>) Hexadecimal number Dans. : owt —» [Faalpoalas “a5lne (eter Fg. Bx, 1.203) Mende rot - Step! —= [rorgiracioosg] - fox ogiis ado se tse ant ay ed pragtied Cocaine SO) Siocon tat ool — eile step —= [roils spooler of — Jorofor food Groups of ox ste ee point Stent aon L& 1? Lote T-T2tsto sip! —= 900 a) Sale 3 bi binary (5702.20), a ‘Octal equivalent number ...Ans. suo —- [pooyorarord [oor iord a uum. 121. fot Ti of a ‘ sepv—-[1]s5]A] 12141 & (BC2AC),, = ($702.230), Roradacial equivalont digit (154, 2A8)y, hexadecimal equivalent ‘number, wns, | EX 121-1 Convert (AGF.C3),g into oe number. anf Bx1203: Hexadecimal equivalent number | ns. ‘Thus, (532.125), = (15a-2A8),, (Refer Fig. Bx. 121.1) bi 1.21 HEXADECIMAL TO OCTAL 8 ise CONVERSION (oateosianter=s) sup [A LrLre Hexadecimal a ee a eter erate) eer Tract] fist conver the hexadecimal number to equivalent binary number | Step | —= eal og ey and then we conver the binary number o equivalent octal number. | caja, oA 44h ‘Steps to be followed : (Refer Fig. 1.21.1) step —-[101]o01 eer Lok oro] cups Step: Writ the given hexadecimal number bie” ted L 1 J Stop V | : Se 3 s [7 el2]2 ne auton aig (5157.622), Octal number Ans, Step 11: Replace each hexadecimal digit by its equivalent 4 a Me bit binary number (UsoFig. Ex. 1.211 ¥ ‘Thus(A6P.C9),y= (5157.62), ‘Step 11: Suarting from either side of the binary point form groups of 3 bits. y ‘Step IV: Replace each 3 bit group with its octal equivalent digit o obtain the octal equivalent sumber, Tech-Neo Publications Where Authors iaypire inooration A SACHIN SHAH Venture (1-20) Number sy Digital Logie & GOA (MU-Sem. 3-Comp) ix r Conversion for [a= Steps for Decimal to radi Uee 1212 ETO If nt i ber. [Convert the following hexadecimal number (674A)e_ Sato "Wale the decimal numb v ‘equivalent octal number. imal number by t. The real Divide the decimal id, dons Seer pained isthe LSB ofthe radix number, ©D Step 1: MSB hexadecimal numbers us. v ie int obtained from step Th, Thy (("Nexadecimal nunbor Step II Divide the quotient obtain sept —+ [ey7|-)4 DA remainder obtained is the second LSB of the rainy Hoxadecimal Coa umber. ‘number yy Tae v step —+ qoriopoi rg] - [100 saat aaah Fioan 2 Stop: Repent il gut Besos ei, saat | | ‘quotient is no longer divisible by r. sept —+ [ooioofia a] Jo rgforqiog v Groups of : inder obtained from the division isthe S ‘Step V: The last remainder Ssnieqavaen LL* 1? [Te Te T+ ume i read from bitom to top. git 5 ° (147.224), (UEK 1.22.4 | Octal equivalent number Ans. 1. 1(c), Dec. 14,4 MQ. 1(b), | epi. Bx. 1.21.2 ‘Convert decimal (214.32) into base 7, zt | Thus, (67.44) ¢= (147.224), DZ ans.: Step 1: Decimal to base 7 conversion of integer part by 4 1.22 DECIMAL INTO RADIX R ‘successive division by 7. CONVERSION Base Quotient Remainder 2 (sp) ~ To convert a decimal number to an equivalent radix r, the | 2 _| {tegee part of the decimal number is converted to radix r by | 2 Read up Successive division by rand the fractional part of the decimal (MsB) ‘number is converted to radix r by using successive co ‘multiplication by r. ©D Step: ~ Inthe suceesive division by, the integer pat is divided by "tll the quotient reaches zero, The remainder to the division = Toobiain the em lent octal integer, the remainders ate ead from bottom to top ~ Im successive multiplication by r, the fractional part ofthe 1.23 RADIX R TO DECIMAL CONVERSION = Steps to be followed to convert a Radix r number to an ‘equivalent decimal number areas follows : ‘Step’ Step 1: ‘Step IV : ‘Write the given number. v ‘Write the positional weights for each digit v ‘Multiply each digit in the given number with its ccomesponding weight to get product of digits or positional value, v Find the sum of products to obtain the decimal equivalent ofthe given radix r number. ‘Tech-Neo Publications.......WBere Authors spire innovation “== SACHIN SHAH Venture Digital Logic & COA (MU-Sem.3-Comp) (1-99) Number torn EX. 1.23.1 ‘Convert (121.2), into hase 10. of the numbers and Ay and B are the least significant hts op ‘numbers. The addition ofthe two numbers is done as follows ®D Slept: Add the LSBs Ayan My Record Ie Sum a5 ay Ans. carry a8 Cp if any, is forwarded to the next cola, = Refer ie Ex. 1231 cy From sp SAA addition i.e, ase 9 rumor + BB addon of Step —- Sy_ Sum Agand By Poninel vsti ©D Suepi: Add the bits A, and B, and cary Cy fom previo sep Te: dn Sacre son 5, sad xy oy Paks is forwarded to next column. sepv —[e]+[e]+[a] + [reece “] El wcuy Sum of podues — %6 06088 AO OA A ; +B BB (16.6666), decimal equivalent’ Ans, sm exraig, Ex. 1.25.1 "> Step HI: Add the bits A, and B, and carry C, from previous 2 212) = 06.6666), 4 1.24 BINARY ARITHMETIC ~ We will smdy the arithmetic operations like addition, subtraction, multiplication and division on binary numbers, Binary avithmetic is required for digital systems and in digital ‘computers. As binary arithmetic comprises of two digits 0 and 1, ‘such simple in comparison to decimal arithmetic, % 1.24.1 Binary Addition ‘Table 1.24.1 shows the rules of binary addition, ‘Table 1.24.1 : Rules of binary addition 8, | [8 [som [cary ol+fo[o] o of+fita [oo ifefo[a To ifefito ya In the first three cass, there is no cary. The addition is similar to the decimal addition. In the fourth case, the addition of 141 = Qy = (10), ie. the addition results in sum = 0 and cany=1 Suppose we want 10 add two 4 bit binary numbers (A, A, Ay ‘Ag) and (By B, B, B,), where A, and B, are the most significant bits Teeh-Neo Publications. Where Authors ispire ovation addition. Record the sum as S, and cary C, is forwarded to the next column, ade © StepIV: Ad the bits A, and B nd cary C, from previous ‘addition. Record the sum as S, and carry C,, Oa ea — oor A A AL Ay + BB, BB, By BR BB cary 3G] SS Sum Example: Add (5) and jy n> 0100, p> 0010, Qa Ay A, AL Me +B, BoB, S 8 5% =A SACHIN SHAH Veata® Bl vigtat Logic & COA (MU-Sem.3.Comp) Number Systems fen ex 1244 ex 1244 Add the two binary numbers (1101.101), and (0101100), Perform the addition (1100010 + 1010001) Ans. : 1 ane. : a a Cary a Number 110 1-101 enum | Ninters + 1-100 eNumbore | Final Sum—> Fracary > 0 0 001 <8 + San Final Fina Su Cary ‘Thus, (1101.101), + (0101.100), = (10011.001), ‘Thus, (1100010+ 1010001) = (10110011), "= Note Ex. 1.24.5 %& (1) Ina column, every pair of 1's results in a carry that | Solve is forwarded to the next higher bit column, 2% (2) If the number of 1's that are to be added in a ‘column is odd then the sum bit is one (1) while if @ (O11011),+ 10010),= ), 5 Gi) (101101), + (11001),= Gi) (01000100.1 100), + (11100100.0111),= (%), Module the number of 1's tobe added is even.then the | 2 Ans. : sum bit is zero (0). a i o Ex 1242 Perform the binary arithmetic Numbert = Porto) (11011.11),+ (1011.0), = Nanking MRP aaa se, es al 110 ot cy 4 Gi Final Sum—> [9] 11 Number} > 1 1 1 t Number2 > 11 1 Final Cary inal Sum —> 10 0 mee [i ‘Thus, (1011011), + (10010), = (1101101), A Fest a8 (101101),+ (11000, = Cary Thus, (1011.11), + (11011.01), = (110111.00), oy > Off a Ex 1243 Numbert > 1 0 1 1 OF Perform the adition of given binary numbers 1000011 +- 1110001 neti oo Bane: FintSsum> f] 0 0 0 1 1 0 cay a oo t Number! 10000118 vat um 4 +11 110 ood a ortono os ‘na'Sum— Oy] . ‘Thus, (101101), + (11001), = (1000110), t ; Final Carry Thus, (1000011), + (1110000, = (10110100), A SUCHIN SHA Vetare ‘Tech-Neo Publications... Where Authors inspire innovation Number g, (1-32) etn Digital Logie & COA (MU-Sem, 3-Comp a - 101 Gi) (01000100,1100),+ (111001009111), = %s 1). Subtaet y= Gy=CO11Dy ic De ncn Cony umn by column subtraction from wean eee] 250! Sensei cm ces ty Nnbert + =o 100 0100-110 fim on 4 Number? + too-04 Final Sum + oor. o01t Brow = Sl BD OD oI t Number 1 mh 9 A x Fal Newbee? FOTO i fu 00 1 0 cany Difference > [5] ‘Thus, (01000100.1100), + (11100100.0111), = (100101001.0011), * inal % 1.24.2 Binary Subtraction a ~The binary subtraction is same as decimal subtraction. yy = (00010), = (2),p inary Mo~ Oi ‘Table 1.24.2 lists the rules of binary subtraction, ‘Table 1.242 : Rules of Binary Subtraction [nes ol-fol o o of-ti 1 1 if-fol 4 0 if-fi o 9 ‘The outputs of binary subtraction are difference and borrow. Consider first case: B, =0,B,=0 0-0 = 0 i.e, difference =: Consider second case By Digit By > B,, we cannot subtract (0 ~ 1), borrow =0 Treefore, we have to bomOW 2, i.e, (10; as the base of binary numbers is 2 ; 1 generaes borow = 1 and atence (10), ~ (),= (1). Aifference = 1, borrow = Consider third case : B, = 1, B, 1-0 = 1 ic. difference 1, bomow = 0, ‘Consider fourth case : B, = 1, B= 1 1 1-1 = Oie. difference: ‘Steps for performing binary subtract as follows : ) borrow = 0, lon for large numbers are In the LSB column, stat subtraction the bit in the lower row from the bt by subtracting it in the upper Y With the help of binary subtraction rules perform the subtraction. Ifthe bitin the upper row is han than the bit in the lower row, borrow 1 from the ‘upper row of column on the left side. The result nt subtraction of two bits is recorded asthe dffenenes, v Repeat step for every column til the MSB bit Step Il: 2) Subtract (0101), from (0110), 'D Step: Perform column by column subtraction from Ls— {MSE using binary ubunction aes MSE se Bonow a Nenber o 1 1 9 Nimer2 5 - 9 1 49 Diternes 5 + Pal vorow : (0110),-101),= (0001), irra “G Ex 1286 Perform (1011.010),—(0110.101), © ans. Perform column by to MSB using bing Msp column subtraction from LS® ary subtraction rules, Final borrow Thus, (011.010), (0110.101), = (Oot00.100), wd SACHIN SHAH Vea Digital Logie & COA (MU-Som. 3-Gomp) (1-39) Number Systems 5x. 1.287 5 Module, ene bist te magnet nunt, a = An & bit signed binary number can represent data in the Hl ane.: ‘hm & bit signed binary number can represent data range 12710 + 127, The MSB Bit sthe sim bit. © Step: Pesfrm column by column subraction fom LSB to MSB using binary subtraction rules. ‘Example i . ifrfo}rjojrjo Boron > Number > 1-100 ° T]o| =+42 Number? = 1700 sient [| '] 2)" ]2 LE] }* 1.258 Diterene + EG TOO | convert 124910 its equivalent sign magnitude form, Tt DD ans.: Pal © Supls Tose tiouy opiate gen sor ‘Thus, (10101.100),— (00111000), = (001110.100), ats, *QeoGeat! “Rainalater 2.124 »4 1.25 REPRESENTATION OF SIGNED 2| @ 0 «LsB) NUMBERS 2) an 0 {4 Riad up ‘A binary number can be positive or negative. The symbol ‘" 218 1 iS sed to represent positive numbers and the symbol "is 2[7 1 Used to represent negative aumbers a In digital computers the sign of a binary number needs to be ——_ s represented using O and 1 aha 1 ~ _Forrepresenting signed numbers there are two methods T tse) a) ‘Sign magnitude form 2) Complement form (1249 = (111100), (@) Vsconplenent © Step tt: Torepreseat (124) gin sign maguiadefoem. ow 2's complement : 1.25.1 Sign Magnitude Form ‘An n-bit signed binary number comprises of two pats : @ — Signbit Gi) Magnitude Refer Fig. 1.25.1 uss bi sign bit Number b of] fol so Magnitude Itbit = 1, Positive number If bit= 0, Negative number (1asn)Fig, 1.25.1 : n-bt signed binary number LsB. If sign bit = 0, the number is postive If sign bit = 1, the number is negative a “2 The number is negative, we will add a sign bit ‘I’ to the ‘of the number. (Refer Fig. Ex. 1.25.1) 124 (1asa)Fig, Ex, 1.25.1 :~ 124 in sign-magnitude form 1.25.2 Representation of Signed Numbers using 1’s Complement or 2's Complement Method For performing binary subtraction, the digital computers use 1's and 2's complement method. ‘The main advantage of using complement method is the reduction in hardware and secondly, they allow the representation of negative numbers. TTech-Neo Publications... Where Authors inspire innovation “ool SACHIN SHAT Ventare eee a" Number Syston (1:34) = ven n-bit number from Digta! Loge & COA (MU-Som. 3-COmB) acpi je To fin o a Binary Exampl Y_1.25.2(A) 1's Complement of peter ig. 1253) Number - aepeLary = The 1's complement of a binary number is ebisined BY] SHR, TI I complementing every bit of the number Le. a 0 changed | Th Timber Tt Ll {01 and vice-versa. (Refer Fig 1.25.2) cmp —-ft [11° Example: ‘complement Senne a Gwen eunber —[a To] spo] ot 1 Stop — TIiriit |e. PRED tscomploment —[o] t]o] 1] +]o] 1] 0 sop —-[ 1] 1] 0 Zecomploment : ‘ofthe number (nan Fig. 1.25.3 ofthe number (OAsSFig. 1.25.2: 1's complement of a number = ILis called as 1’s complement because if we subtract the | 2 1.25.3 Binary Subtraction using 1’s ven number from IIITTIT1 to get the result, itis same as Complement Method complemeating the number. = Inbinary subtraction using 1's complement mithod, we ad 1's complement of the subtrahend to the minuend. If th addition results in a carry then the carry is addeg to the LSt Ex. 1.25.2 Obtain the 1's complement ofthe following numbers Ans.: (Refer Fig, Ex. 1.25.2(a) and ()) of the number to get final result, If the MSB bit is 0, then th von eunbee [3] oT Ta] TTS results positive and in tru binary form. Tit tii T ~ If the MSB bit is 1, then the result is negative and in I’ wsieicner! complement form. Convert it to true binary form by taki complement [o] 1]0] 1] 1]o]o] 1 1 coplment, (n89Fig, Ex. 1.25.2) Steps to be followed for binary subtraction using 1° lement are orien Fi oo] so ae ere TItt Step'1: Obtain the 1's complement ofthe subwahend. ‘V's complement }o} 0] 1] 1] 0] 1 v Step TL: Add minuend to the 1's com 's complement of subtrahend (89 Fig. Ex. 1.25.20) ‘sig rules of binary addition, %_1.25.2(8) 2's Complement of a Binary Mj ‘Number Step IT: teary is 1, then add it to tis ie LSB to get the result of inary su ~ 2's complement aithmetic is use in computers or handling metestion negative numbers. Instead of using separate circuits fer V binary addition and subtraction, only adding cireis, ie, adders are used. The complement ofthe subtrahend is nda ‘o the minuend rather than subtracting the number, ~ The? complemen ofa binary number canbe obtained by (1) Adding 1 tothe LSB of 1's complement ofthat number, 2's complement = 1°s complement + 1 (2) Beginning from the LSB, write down each bit upto and including. the first one and then complement. ine remaining bits. ‘Teeh-Neo Publications... Where Authors inspire innovation nd SACHIN SHAH Yeats 1B] og tape a con sn. ca ic sexpert Ex 1.28; 5 rout [7] +] ° [2 Perform (5)o~ (2) sing 1's complement method. TI ane: | D StepT: Obiain 1's complement of subtrahend. ‘scomplemont ofrosut | 9 | 0 | 1 | 7 @y = 0010), — V'scomplement of @)jq = (1101), @ho © Step: Add (5),9to 1's complement of (2),p (Manip, Bx. 1.254 Thus, 2 Bye = Ow=O3) Ow = Ex. 1.255 Vscomplementof@)y = + ‘Subtract (3),9~ (44) using one’s complement. moo: 0 | Bans.: 5 ©D step: “Obtain 1's complement of (44),9 End around carry 'D Step III: Add carry to the result obtained in step Il oo10 + 1. (End around cary) StepIV:Gheck «0.0.1 1 & Answeris postive andin SB A tne binary form Bho Ex. 1.25.4 Perform (2)q~(5)jousing 1's complement method. Dans. |} Step I: To obtain 1's complement of the subtrahend. io = 101), V'scomplement of 5); = (1010), © Step I: Add @2),gto 1’s complement of (jo a 5 @ 0 010 Vscomplementof (Sy + 10 1 0 . Hq = (101100), 1's complement of (44),9 = (010011), ©D Step I: Add @3),oto the I's complement of (44)i9 og ho oo 4 ++1's complement of (44)0 Result 1101 00 tT se MSB = 1, Hence, the answer is negative and in 1’s complement form. 7 > Step III: Take 1's complement of the result to-obtain the answer in true binary form. Result 110100 Vscomplement: (0101 Dy goror (De ‘Thus, (B3),9- (44), CD, Ex. 1.25.6 Find the one’s complement and two's complement of (57). Result: 1 oo 7 @ ans.: Neb ol © Step 1: Tobiain I's complement of (57)9 The MSB = 1. Hence, the answer is negative and in I's (Ne = (111001), complement form. 1's complement of (57) = (000110), ©D Step HI; Take 1's complement of the result to obtain the answer in true binary form. (Refer Fig. Ex. 1.25.4) Teck-NeoPablicatons.-—.Where Authors inspire ianoation A SACHIN SHAE Vata Module ae ‘To find 2's complement of (S70 © sept Vscomplementof(STyp = 000110 ASA (Dyo + 1 2ecomplement of So >» OOOTTT ‘Thus, 215 Complement of (S79 = (00011), %& 1.25.4 Binary Subtraction using 2's Complement Method — The2's complement method is used for representing negative numbers, = Inbinary subtraction using 2's complement method, we add the minuend with 2's complement of the subtrahend. If carry {is generated from the addition, always ignore the carry. If the MSB bit ofthe result is zero then the result is positive and in true binary form. If the MSB bit of the result is ‘one (1), then the result is negative and in 2's complement form, To obtain the result in true binary form, take the 2's ‘complement ofthe number. Steps to be followed ‘StepT: Add minuend to the 2°s complement of the subtrahend. v Ignore cary, if any. If MSB = 0, result is positive and in true binary form.” v If MSB = 1, result is negative and in 2's complement form. Compute 2's complement to obtain the result in tue binary form. Step I: Step I: Ex. 1.25.7 Perform the subtraction using 2's complement, 2 G2hg Ans. : © step: Conver the minsnd and subrahend to binary. Base Quotient. Remainder 2[m 2 [5 1 ase) Sas Te 1 @ 3 ° Saad bp, 2 1 terme >) (MsB) Cy = 011), 2 32. “ST es. ss) 2 16° } 2 : Read up 4 0 2 | + — 2 | 2 0 . 0 2[ 1 >I (MsB) GDq = (100000), ©D step It: Obtain 2's complement of 220 @)yp=1 0 0 0 00 goooo a 1 1's complement of (32)jo + =O Add 1 + 1 2'scomplement of 320 _1 0 0 0 0 0 ©} Step IIT: Add (27),9to 2's complement of (32)i9 QM + O11011 complement of (32) + Resu 100000 111011 (loca MSB: ‘MSB = | indicates that result is negative and in 2's ‘complement form, © Step IV: Take2's complement ofthe result, Result: 111011 Uscomplement Add1 + 000100 Final Result: 000101 Thus, Nig B2).y= 5) [ete iellerbieig@ A SACI STA To Tl dita Logic & COA (uU-Sem. Comp) Number Systems 0-37) Ex. 1.25.6 DUES SERIES ©D Step IV: Compute 2's complement to get the result is true Module Perform the subtraction, (52)j, — (65) using 2's complement binary form. tL aa Lscomplement of result: 0.0.01 1.0.0 ase Add 1+ 1 ©D Step 1: To find the binary equivalent of (52)j,and (65),5 Base| Quotient Remainder 2] 2 2 | 36 0 asp) 2[ 3 ° 2] Read up n2:| 2] use) (52)9=(110100), Base Quotient Remainder 26 2 | 2 1 @sB) 2 | 6 ° 2[ 6 ° 2/4 0 Read up zt ° 211 ° > 1 ass) d= 'D Step II: To obtain 2's complement of (65), p= 1000001 1000001), 1's complement of (65) = 01 11110 Add 1+ 1 2's complement of 65)io 01 1 1111 ©D step Ml: Add (52) the 2's complement of (5)o oy mf ood G+ 0 1 1 0 100 2'scomplement of 659 0 1 oF 1 ttt peot:6] Gt ' 9 91! ft T nocary 1 MSB */ MSB = 1, result is negative and in 2's complement form. ‘Teeh-Neo Publications... Where Authors inspire ianoation 2's complement of result: 0.0.0 1 1 0 1 = (130 13), ee (ERELE] MU. (0), Doo. 13.25 Marks | ‘Subtract the following using 2's complement (11),9~(22)j0, 1 ans ©D step 1: Find the binary equivalent of (1p and 22hig (Do = COW), 22,9 = (10110), Base Quotient Remainder 2 | 2» 2 {4 a) 25 1 2 2° 1 eae (usB) © Step 1: To find the 2's complement of 22), @%_ = (1 0110» a 1scomplement of (22)p = 1001) Addl + 1 2's complement of (22)g->0 1 0.10 © Step I: Add (11)pt0 the 2's complement of (22),9 cm O O (p> 0 1-0 aod 2's complement (22)jp > + 0 1 0 0 Result m + vow No Carry MSB ‘MSB = 1, result is negaiive and in 2's complement form. A SACHIN SHAH Venture Digital Logic & COA (MI sam. 3-Comp) *D Step 1¥ Take 2' complement of te res toro) Result V's complement of Result; 0 1-0 1 0 Add 4 1 Final Result: 1 0 tt 8D SUD y= Q2Dyq = CD RTSSRESATY MU - 0.10) May 15.4 Marke Perform binary subtraction using 2'* complement for (62)g and (99),9 DZ ans.: © Step: Find the binary equivlent of (62)y and (95) Fase Quotic Remainder o asp) 1 1 1 Read up ~ 1 1 ase) Remainder 1 asp) 1 ° g Read up ° 1 > 1 oMsBy (29)9= (1100011), © Step I: To find 2's complement of (99). Ow 1100014 H's complement of © 0011100 Add (yo + 1 2's complement of (99), > Dotter Tech-Neo Publications nn... Where Authors inspire innovation . Number Syston IT Add 62), 9102's complement of (99). goog — Fa ans a a © siepIV: Convert te answer in tue binary form by ttn 2's complement of the result. Result 1011011 U's complement of esult-> 0100100 Add 1+ 1 Final Result 0 100101 =GDy ©)y- Op = 3D 0 UEx. 1.25.11 TC TOME ECR ‘Subtract using 1s and 2's complement method. G9- (76)9 To obtain the binary equivalent of (56),. nd (76). Base Quotient Remainder 2 | 56 2 | 28 © ass) 2/4 ° 2[77 ° sulirane : Read up 24 1 > 1 uss) (56),9= (111000), nd SACHIN SHAH Feat (1-30) Number Systems Digtal Logic & COA (MU-Sem. 3.Comp) Base Quotient Remainder 2| 2 | 38 ° asy 2 [19 ° 2[ 9 1 >t i Read up 2T2 o aha ° ts asp) (16),5= (1001100), © Step 11: To obtain 1's complement and 2's complement of yp @_>10011 00 oo Vscomplementof Ty 01100 1 1 Add + 1 2's complement of yy 0110 19 0 © SuepIl: Add (56}0 I's complement of (5)y ey> Co> 0 1 11000 V's complementof (769+ 0 1 1 0 011 Reut>[] GJ 1 01017 tT Nocanry MSB Since MSB = 1, result is negative and in 1’s complement form. To get result in true binary form, take 1"s complement of the result Result: 1101011 1's complement of result: 0.0 101.00 =(20)9 (16)y = (-20)9 using 1’s complement method. © Step IV: Add (56),o10 2's complement of (76,9 ay> 7} O (Ho 0 111000 1’s complement of (76)yo + o 110100 rent 1 91108 tT T Nocary MSB=1 Since, MSB = 1, result is negative and in 2's complement form. To obtain the result in true binary form, take 2's complement ofthe result. “Tech-Neo Publications... Where Authors inspire innovation trord oo Module, oo 1 Result Hscomplement of Result: 0.010 0 1 1 1 00 =20)9 Add 1 2's complement of Result 0 0 1 0 ‘Thus, (56), 1 = (1649 = (20), using 2's complement method. UEx. 1.25.12 UCC MEN REELED Subtract using 1's and 2's method :(15),9~ 209 Dans. : D Step 1: To obtain the binary equivalent of (15), and (21) (15,9 = aD, Base Quotient Remainder 2| 2 2 | 10 1 assy 2[ 5 ° 2[ 2 1 Fh 0 Read up “™ 1 ass) 10101, ©D Step: To find the 1's and 2's complement of 21,9 Qo: 1 0 101 V's complement of 219: 0 1 0 1 0 + ‘Add 2's complement of (21) _0 0 D Step III: Add (15),ot0 1"s complement of (21) 0, oy OOO 0939 oad Vs complement of 2Djp > + 0 1 0 1.0 Result G] G] 1 0 01 tT Nocary mse Since MSB = 1, result is negative and in 1°s complement form. Take 1s complement of the result to obtain result in true binary form. “=A SACHIN SHAH Venture BB) pat Logie & con ay-som.3-Comg Result: 11.001 Vscomplement of Result: 0.0.1 1 0 =(e 2p = yg using Vs complement method. © StepIV: Add (15)qt02's complement of 209 goaa Cary—> (18)o—> € 4 ob tat 2scomplementol (2}y—> + 0 1 0 1 1 Ret J] ft o 1 0 1 T No MSB cary Since MSB = 1, result is negative and in 2's complement form. To obtain the’ result in true binary form, take the 2's complement, Rest: 11051 0 a V'scomplement of Result: 001 0 1 Add + 1 2's complement of Result: 001 1 0 =O 89),o 0 its equivalent ‘and 2's complement form. © ans.: D Step1: ‘To convert (89),pinto binary by successive di by2. Base Quotient Remainder 4 1 asp) Number: (1-40) in its equivalent supa: To vepeent #0 cite Ser agitate, 18 complement 2nd 2's comp, form complement jude | 1's complem Number| one fion | representation -: 0 Tao | _ 11011001 2010014 yi 1.26 BINARY MULTIPLICATION “The rules of binary multiplication are = Ex. 1.26.1 Perform the following binary multiplication. (@ 1011 xo101 1001.001 x 1010.101 (Gi 101.01 x 11.01 Dans. : (1011x0101 wo x 1 oo on (i) 101.001 x 1010.101 1001-001 X10 10-104 1001001 90 00000 100 1001 9000 000 10010 94 00000 9 1001001 tioov00

You might also like