1 / 20

Discrete Structures

Discrete Structures. ICS-252 Dr. Ahmed Youssef. 1. References. Discrete Mathematics and its Applications Kenneth Rosen Lecture Notes. Discrete Structures Definition.

shelley
Télécharger la présentation

Discrete Structures

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Discrete Structures ICS-252 Dr. Ahmed Youssef 1

  2. References • Discrete Mathematics and its Applications Kenneth Rosen • Lecture Notes.

  3. Discrete Structures Definition • Discrete structure deals with discrete objects. Discrete objects are those which are separated from (not connected) each other. • Examples: • Integers (whole numbers 5, 10, 15) • Automobiles, houses, people etc. are all discrete objects. • On the other hand real numbers (such as 5.35, 5.2345) are not discrete.

  4. Importance of Discrete Structures • It provides foundation material for computer science. • It includes important material from such areas as set theory, logic, and graph theory. • The graph theory concepts are used in networks, operating systems, and compilers. • Set theory concepts are used in software engineering and in databases. • In engineering, It can be used to control multiproduct batch plants, and design of a new class of simulator.

  5. Representations of Integers

  6. Number Theory • It is the branch of pure mathematics concerned with the properties of numbers in general, and integers in particular. Number Theory Areas: • Elementary number theory-Study of Integers. • Analytic number theory-employs the machinery of calculus and complex analysis to tackle questions about integers.

  7. Introduction # Computers usually use binary notation (with 2 as the base) when carrying out arithmetic. # Computers usually use octal (base 8) or hexadecimal (base 16) notation when expressing characters such as letters or digits. # The binary digits are: 0 and 1. # The octal digits are: 0, 1, 2, 3, 4, 5, 6, and 7. # The decimal digits are: 0, 1, 2, 3, 4, 5, 6, 7, 8, and 9. # The hexadecimal digits are: 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, A, B, C, D, E and F.

  8. Decimal System b-base System b=2binary b=8 octal b=16  hexadecimal

  9. Base b expansion of n Theorem: Let b be a positive integer greater than 1. Then if n is a positive integer, it can be expressed uniquely in the form n = akbk + ak-1bk-1+…+a1 b + a0 where k is a nonnegative integer, a0, a1,…, ak are nonnegative Integers less than b and ak ≠0 . The base b expansion of n is denoted by: (akak-1 …a1 a0) Remarks: This theorem is used to convert the number from any b-base to decimal-base.

  10. Example : What is the decimal expansion of the hexadecimal expansion of (2AE0B)16 Sol: we will use the expansion n = akbk + ak-1bk-1+…+a1 b + a0 where b=16 (2AE0B)16 =2 x 164 + 10 x 163 + 14 x 162 + 0 x16 +11 =(175627)10

  11. Example : What is the decimal expansion of the binary expansion of (101011111)2 Sol: we will use the expansion n = akbk + ak-1bk-1+…+a1 b + a0 where b=2 (101011111)2 =1 x 28 + 0 x 27 + 1 x 26 + 0 x 25 + 1 x 24 + 1 x 23 + 1 x 22 + 1 x 2 + 1 x 20 =(351)10

  12. Example : Find the base 8 expansion of (12345)10 12345 = 8 x 1543 + 1 1543 = 8 x 192 + 7 192 = 8 x 24 + 0 24 = 8 x 3 + 0 3 = 8 x 0 + 3 (12345)10 =(30071)8

  13. Example : Find the base 2 expansion of (241)10 (241)10 =(11110001)2

  14. Convert these integers from decimal to: binary; octal; and hexadecimal. (a) 203 (b) 4532 (c) 97644 2. Convert these integers from base b to decimal number. (a) (11011)2 (b) (80E)16 (c) (7345321)8

  15. To convert a binary number to octal or hexadecimal numbers.

  16. Example : What is the hexadecimal expansion of the binary expansion of (101011111)2 Sol: (101011111)2 = (0001 0101 1111)2 =(15F) 16 Example : What is the octa expansion of the binary expansion of (101011111)2 Sol: (101011111)2 = (101 011 111)2 =(537)8

  17. Example : What is the binary expansion of the (A10D)16 Sol: (A10D)16 =(1010000100001101)2 Example : What is the binary expansion of (537)8 Sol: (537)8 = (101 011 111)2

  18. Find the octal and hexadecimal expansions of (11 1110 1011 1100)2 • Find the binary expansions of (765)8 and (A8D)16.

More Related