Presentation is loading. Please wait.

Presentation is loading. Please wait.

Department of Management School of Business, Economics and Informatics Binary Numbers 2 Eva Szatmari

Similar presentations


Presentation on theme: "Department of Management School of Business, Economics and Informatics Binary Numbers 2 Eva Szatmari"— Presentation transcript:

1 Department of Management School of Business, Economics and Informatics Binary Numbers 2 Eva Szatmari e.szatmari@bbk.ac.uk

2 Learning Objectives Recap BIN Fractions in BIN Two’s complement notation Excess notation Floating point notation

3 Video Tutorials http://bbk.libguides.com/computerscience /mathstutorials http://www.bbk.ac.uk/mathstutorials/ https://www.youtube.com/playlist?list=PL2F y-5oxIlb6cG15wxnhRdAmdskil_3-7 Warning: floating point notation!

4 Recap BIN What are BIN nos? How do we convert BIN to DEC? How do we convert DEC to BIN?

5 Fractions in BIN Example 1: 11.101 Example 2: 1010.1101

6 Fractions in BIN

7

8

9 Two’s Complement Notation Negative numbers in BIN? Two’s complement Sign bit, distinguishing between negative and positive numbers What is 0 represented as in two’s complement notation?

10 Two’s Complement Notation First fix the number of digits, e.g.: 4 bits Find the positive BIN equivalent Copy all digits from right to left till a 1 had been copied Complement (invert/flip) the rest of the digits

11 Two’s Complement Notation 4 bits two’s complement Example 1:Example 2: -2-4 6 bits two’s complement Example 3:Example 4: 100100011001

12 Two’s Complement Notation 5 bits two’s complement: a)– 8 b)– 13 c)10101 d)11010

13 Two’s Complement Notation 5 bits two’s complement: a)– 8 = 11000 b)– 13 = 10011 c)10101 = - 11 d)11010 = - 5

14 Excess Notation Another way of representing negative numbers in BIN What is 0 represented as in excess notation? What positive numbers look like? What negative numbers look like? How many digits do you use?

15 Excess Notation 4 bits excess: Example 1:Example 2: - 7- 5 Example 3:Example 4: 42

16 Excess Notation 4 bits excess: a)- 6 b)- 1 c) 5 d) 7

17 Excess Notation 4 bits excess: a)- 6 = 0001 b)- 1 = 0111 c) 5 = 1101 d) 7 = 1111

18 Floating Point Notation s e1e2e3 m1m2m3m4 What does this sequence mean? What is s? What are e1e2e3? What are m1m2m3m4?

19 Floating Point Notation Normalization Example 1: 0.0011001 Exponent:Mantissa: Example 2: 101.10010 Exponent:Mantissa:

20 Floating Point Notation Step1 : identify the sign bit (0 for +, 1 for – numbers) Step 2 : find the mantissa (move the radix point to 0.1… format, record the first 4 digits after the point) Step 3 : find the exponent in 3 bits excess notation Step 4 : record the number: s e1e2e3 m1m2m3m4

21 Floating Point Notation

22

23

24 Example 1:Example 2: 0101100110101101 Example 3: Example 4: 1010110011011100

25 Floating Point Notation a)10111011 b)10011100

26 Floating Point Notation

27 Any Questions?

28 Contact Details Eva Szatmari 0207 631 6254 Or e.szatmari@bbk.ac.uk GOOD LUCK


Download ppt "Department of Management School of Business, Economics and Informatics Binary Numbers 2 Eva Szatmari"

Similar presentations


Ads by Google