Discrete Math: Positional Representation and Uniqueness Concepts

clicker frequency ca n.w
1 / 21
Embed
Share

Explore the fundamentals of positional representation and uniqueness in discrete math, covering topics such as binary number systems, algorithms, and parity. Test your knowledge with questions on binary conversions and coefficient comparisons while delving into the systematic approaches to solve them. Dive into the world of numbers as the building blocks of mathematical concepts.

  • Discrete Math
  • Positional Representation
  • Uniqueness
  • Binary Numbers
  • Algorithms

Uploaded on | 0 Views


Download Presentation

Please find below an Image/Link to download the presentation.

The content on the website is provided AS IS for your information and personal use only. It may not be sold, licensed, or shared on other websites without obtaining consent from the author. If you encounter any issues during the download, it is possible that the publisher has removed the file from their server.

You are allowed to download the files provided on this website for personal or commercial use, subject to the condition that they are used lawfully. All files are the property of their respective owners.

The content on the website is provided AS IS for your information and personal use only. It may not be sold, licensed, or shared on other websites without obtaining consent from the author.

E N D

Presentation Transcript


  1. Clicker frequency: CA CSE 20 DISCRETE MATH Prof. Shachar Lovett http://cseweb.ucsd.edu/classes/wi15/cse20-a/

  2. Todays topics Algorithms: number systems, binary representation Section 1.3 in Jenkyns, Stephenson

  3. Numbers are building blocks Five

  4. Positional representation JS p. 22 What s the (decimal) value of 10001 {2}? A. 5 {10} B. 17 {10} C. -1 {10} D. 10001 {10} E. None of the above / more than one of the above.

  5. Positional representation JS p. 22 What s the base 2 representation of the (decimal) number 42 {10}? A. 111111 {2} B. 100001 {2} C. 101010 {2} D. 110011 {2} E. None of the above / more than one of the above.

  6. Positional representation JS p. 22 What s the biggest integer value whose binary representation has 4 bits? A. 24 = 16 {10} B. 23 = 8 {10} C. 4 {10} D. 1000 {10} E. None of the above / more than one of the above.

  7. Uniqueness Is it possible to have ? A. No. B. Yes, but m has to be the same as n. C. Yes, and m,n can be different but for each kind of coefficient that appears in both, it has to agree. That is, a0 = b0, a1 = b1, etc. D. Yes, if m=n and all the coefficients agree. E. More than one of the above / none of the above.

  8. Parity and shift

  9. Shifts

  10. Positional representation JS p. 22 What s the base 2 representation of the (decimal) number 2014 {10}? A. 11111011110 {2} B. 10000000000 {2} C. 10101010101 {2} D. 1000000001 {2} E. None of the above / more than one of the above.

  11. Positional representation JS p. 22 What s the base 2 representation of the (decimal) number 2014 {10}? A. 11111011110 {2} B. 10000000000 {2} C. 10101010101 {2} D. 1000000001 {2} E. None of the above / more than one of the above. Is there a systematic way (aka algorithm) to do it?

  12. Decimal to Binary conversion Right to left toBinary(pos int n) Begin x ; i n; While i>0 Do If (i is even) Then x 0 .x; End; If (i is odd) Then x 1 .x; End; i i/2; Output x End. Questions to ask: Does it always terminate? Does it give the correct answer? What is the time complexity?

  13. Other numbers? Fractional components Negative numbers aka how to subtract first, how do we add? A. 111 B. 100 C. 1011 D. 1111 E. None of the above.

  14. One bit addition 1 Carry: 1 0 1 + 1 1 0 1 0 0 1

  15. Subtraction JS p. 6 Borrowing A B = (A 10) + (10 B) Carrying A B = (A+10) (B+10) Complementation A B = A + Bc = A + [ (99-B) - 99 ] = A + [ (100-B) 100 ]

  16. 2s complement How many numbers are we representing with 4 bits? 0000 1111 0001 0 1110 -1 0010 1 -2 2 1101 0011 -3 -4 -5 3 4 5 1100 -6 6 Complete the wheel of numbers! -7 7 -8 1001 0111 1000

  17. How to add binary numbers? 1 1 0 0 1 0 1 0 1 + 1 0 1 1 0 1 1 0 1 ? ? ? ? ? ? ? ? ? ?

  18. How to add binary numbers? ? ? ? ? ? ? ? ? (carry) 1 1 0 0 1 0 1 0 1 + 1 0 1 1 0 1 1 0 1 ? ? ? ? ? ? ? ? ? ?

  19. How to add binary numbers? ? ? ? ? ? ? ? ? (carry) 1 1 0 0 1 0 1 0 1 + 1 0 1 1 0 1 1 0 1 ? ? ? ? ? ? ? ? ? ? Two basic operations: One-Bit-Addition(bit1, bit2, carry) Next-carry(bit1, bit2, carry)

  20. Numbers logic circuits

  21. Next class Boolean circuits and truth tables Read sections 3.2-3.4 in Jenkyns, Stephenson

Related


More Related Content