Digital Logic Design (CEN-120)

(3+1)

SENIOR LECTURER Engr. Syed Rizwan Ali, MS(CAAD) UK, PDG(CS) UK, PGD (PM) IR, BS (BCE) PK HEC Certified – Master Trainer (MT-FPDP) Computer Sciences Department Bahria University (Karachi Campus)

DIFFERENT NUMBER SYSTEMS Lecture No 02.2 Floyd, Digital Fundamentals, 10th edBy Engr. Syed Rizwan © 2009 Pearson Ali Education, Upper Saddle River, NJ 07458. All Rights Reserved

Lecture Content In this Class, we will be learning…  Different number systems  Why use different ones?  Binary / Octal / Hexadecimal  Conversions  Negative number representation  Binary Arithmetic  Overflow / Underflow  Addition / Subtraction

Different Number Systems

Different Number System 





  

The system used to count discrete units is called number system. There are four systems of arithmetic which are often used in digital electronics. Decimal Number System Binary Number System Octal Number System Hexa Decimal System

Why Use Different One? 

Computers work only on two states  



On Off

Basic memory elements hold only two states 

Zero / One

Thus a number system with two elements {0,1}  A binary digit – bit ! 

Common Number System System

Base Symbols

Used by humans?

Decimal

10

0, 1, … 9

Yes

Binary

2

0, 1

No

Octal

8

0, 1, … 7

No

Hexadecimal

16

0, 1, … 9, A, B, … F

No

Quantities/Counting (1 of 3) Decimal 0 1 2 3 4 5 6 7

Binary 0 1 10 11 100 101 110 111

Octal 0 1 2 3 4 5 6 7

Hexa-Decimal 0 1 2 3 4 5 6 7

Quantities/Counting (2 of 3) Decimal 8 9 10 11 12 13 14 15

Binary 1000 1001 1010 1011 1100 1101 1110 1111

Octal 10 11 12 13 14 15 16 17

Hexa-Decimal 8 9 A B C D E F

Quantities/Counting (3 of 3) Decimal 16 17 18 19 20 21 22 23

Binary Octal 10000 20 10001 21 10010 22 10011 23 10100 24 10101 25 10110 26 10111 27

Hexa-Decimal 10 11 12 13 14 15 16 17

Conversions

Conversion Among Bases 

The possibilities: Decimal

Octal

Binary

Hexadecimal

Binary

Decimal

1101 = 1 x 23 + 1 x 22 + 0 x 21 + 1 x 20 =1x8+1x4+0x2+1x1 =8+4+0+1 (1101)2 = (13)10

1, 2, 4, 8, 16, 32, 64, 128, 256, 512, ….

Decimal

Binary

2

13

1

LSB

2 2 2

6 3 1 0

0 1 1

MSB

(13)10 = (1101)2

Octal

Decimal

(137) 8 = (?) 10 = 1 x 82 + 3 x 8 1 + 7 x 80 = 1 x 64 + 3 x 8 + 7 x 1 = 64 + 24 + 7 (137)8 = (95)10 

Digits used in Octal number system – 0 to 7

Decimal

8 95 8 11 1-

Octal

7

3

8 95

7

8 11 1-

3 1

1

(95)10 = (137)8

LSB

MSB

Hexa

Decimal

BAD = 11 x 162 + 10 x 161 + 13 x 160 = 11 x 256 + 10 x 16 + 13 x 1 = 2816 + 160 + 13 (BAD)16 = (2989)10

A = 10, B = 11, C = 12, D = 13, E = 14, F = 15

Decimal

Hexa

16 2989

13

16 186 11 -

10 11

LSB

MSB

(2989)10 = (BAD)16

Why octal or hex? 





Ease of use and conversion Three bits make one octal digit 111 010 110 101 7 2 6 5 => (7265)8 in octal

Four bits make one hexadecimal digit 4 bits = nibble 1110 1011 0101 E B 5 => (EB5)16 in hex

Fractions 

Natural to Decimal 3.14 =>

4 x 10-2 = 0.04 1 x 10-1 = 0.1 3 x 100 = 3 3.14

Fractions 

Binary to decimal 10.1011 =>

1 x 2-4 = 0.0625 1 x 2-3 = 0 x 2-2 = 1 x 2-1 = 0 x 20 = 1 x 21 =

0.125 0.0 0.5 0.0 2.0 2.6875

Fractions 

Decimal to binary 3.14579

11.001001...

.14579 x 2 0.29158 x 2 0.58316 x 2 1.16632 x 2 0.33264 x 2 0.66528 x 2 1.33056 etc.

Any Questions

??

???

Lecture 02

Engr. Syed Rizwan Ali, MS(CAAD) UK,. PDG(CS) UK, PGD (PM) IR, BS (BCE) PK. HEC Certified – Master Trainer (MT-FPDP). Computer Sciences Department.

551KB Sizes 2 Downloads 329 Views

Recommend Documents

lecture-02-Chapter 02 - language of the Computer - 01-sv.pdf ...
lecture-02-Chapter 02 - language of the Computer - 01-sv.pdf. lecture-02-Chapter 02 - language of the Computer - 01-sv.pdf. Open. Extract. Open with. Sign In.

Lecture 7
Nov 22, 2016 - Faculty of Computer and Information Sciences. Ain Shams University ... A into two subsequences A0 and A1 such that all the elements in A0 are ... In this example, once the list has been partitioned around the pivot, each sublist .....

LECTURE - CHECKLIST
Consider hardware available for visual aids - Computer/ Laptop, LCD ... Decide timing- 65 minutes for lecture and 10 minutes for questions and answers.

Lecture 3
Oct 11, 2016 - request to the time the data is available at the ... If you want to fight big fires, you want high ... On the above architecture, consider the problem.

1660-02-02
Jun 29, 2017 - ... awarded to any vessel under the Tennessee numbering system ... on each side of the vessel on the windows located nearest the main ...

1660-02-02
Jun 29, 2017 - signs to be temporarily but firmly mounted upon or attached to the vessel ... (e) Vessels with a valid document issued by the United States Coast ...

1660-02-02
Jun 1, 2017 - on each side of the vessel on the windows located nearest the main operator ... if not equipped with windows, the decal shall be placed in the ...

1720-02-02
Aug 1, 2017 - Repeal filed September 16, 2016; effective August 1, 2017. 1720-02-02-.02 REPEALED. Authority: T.C.A. § 49-9-209(e) and Public Acts of ...

1720-02-02
Aug 1, 2017 - Authority: T.C.A. § 49-9-209(e) and Public Acts of Tennessee, 1839-1840, Chapter 98, Section 5, and. Public Acts of Tennessee, 1807, Chapter 64. Administrative History: Original rule filed September 15,. 1976; effective October 15, 197

pdf-1490\record-of-agard-lecture-series-lecture ...
... the apps below to open or edit this item. pdf-1490\record-of-agard-lecture-series-lecture-series-i ... unne-j-c-north-atlantic-treaty-organization-vannucci.pdf.

Lectures / Lecture 4
Mar 1, 2010 - Exam 1 is next week during normal lecture hours. You'll find resources to help you prepare for the exam, which will be comprehensive, on the.

Prize Lecture slides
Dec 8, 2011 - Statistical Model for government surplus net-of interest st st = ∞. ∑ ... +R. −1 bt+1,t ≥ 0. Iterating backward bt = − t−1. ∑ j=0. Rj+1st+j−1 + Rtb0.

Lecture Note_Spectrophotometry.pdf
Aug 18, 2016 - ... rival UV‐Visible spectrometry. for its simplicity simplicity, versatility versatility, speed, accuracy accuracy and. cost‐effectiveness. Page 1 of 34 ...

Lecture 9
Feb 15, 2016 - ideological content have persisted among the American public from 1987 to 2012.2 ... That is, learning is social and takes place within the individuals' ... independent network structures, deriving always consensus results.

Lectures / Lecture 4
Mar 1, 2010 - course website. After lecture today, there will also be a review section. • Assignments are graded on a /–, /, /+ basis whereas exams are graded.

Lectures / Lecture 7
Apr 5, 2010 - Contents. 1 Introduction (0:00–5:00). 2. 2 Security (5:00–112:00). 2 .... use it to distribute pornography, you don't have to pay for disk space or bandwidth, but you might make money off ... requests—the more of a threat you pose

Inaugural lecture
Jan 31, 2001 - Contemporary global capitalism results from interactions between economics, finance, and technology. Any number of ... the form of software, but in the creation of images, and symbols. You could view it as a .... formal structures, rul

Frederick Sanger - Nobel Lecture
and hence the number of amino acid residues present. Values varying from ... In order to study in more detail the free amino groups of insulin and other proteins, a general ... disulphide bridges of cystine residues. Insulin is relatively rich in ...

Lecture Capture - USFSM
Step 2 on the Crestron: Touch the Lecture Capture Mode to turn on the projector and camera. Page 2. Step 3 on the Crestron Choose Podium PC. Now you will see your desktop on the projector. Panopto. Step 1 Log in to myUSF. Page 3. Step 2 Launch Canvas

Lecture 1 - GitHub
Jan 9, 2018 - We will put special emphasis on learning to use certain tools common to companies which actually do data ... Class time will consist of a combination of lecture, discussion, questions and answers, and problem solving, .... After this da

2014 02 02 Newsletter February 02 2014.pdf
were originally celebrated on one occasion, at the end of the cate- chumenal journey, normally at the Easter Vigil. The path of for- mation and gradual ... and defend the faith, ... to confess the name of Christ boldly, and. never to be ashamed of hi

Lecture(PDF)
Structured programming uses an approach whichistop down,. OOPuses an ... anyshape it get rotated clockwise 360 degree and a soundis also played.

Inquisitive semantics lecture notes
Jun 25, 2012 - reformulated as a recursive definition of the set |ϕ|g of models over a domain. D in which ϕ is true relative to an assignment g. The inductive ...