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

Slides:



Advertisements
Similar presentations
ECE 331 – Digital System Design
Advertisements

Data Representation COE 202 Digital Logic Design Dr. Aiman El-Maleh
CSE115/ENGR160 Discrete Mathematics 03/13/12 Ming-Hsuan Yang UC Merced 1.
Number Theory and Cryptography
Digital Electronics Course Introduction, Number Systems, Conversion between Bases, and Basic Binary Arithmetic (Lecture #1)
Copyright (c) 2004 Professor Keith W. Noe Number Systems & Codes Part I.
CS 151 Digital Systems Design Lecture 2 Number Systems Prof. Ahmed Sameh Room 239A.
Chapter Chapter Goals Know the different types of numbers Describe positional notation.
ECE 301 – Digital Electronics Course Introduction, Number Systems, Conversion between Bases, and Basic Binary Arithmetic (Lecture #1)
ECE 331 – Digital System Design
ECE 301 – Digital Electronics Number Systems and Conversion, Binary Arithmetic, and Representation of Negative Numbers (Lecture #10) The slides included.
ENGIN112 L2: Number Systems September 5, 2003 ENGIN 112 Intro to Electrical and Computer Engineering Lecture 2 Number Systems Russell Tessier KEB 309 G.
COE 202: Digital Logic Design Number Systems Part 1
Number Systems Lecture 02.
Binary Number Systems.
WHOLE NUMBERS; INTEGERS Whole numbers: Z 0,+ = the natural numbers  {0}. Integers:
Fall 2002CMSC Discrete Structures1 Let us get into… Number Theory.
C OURSE : D ISCRETE STRUCTURE CODE : ICS 252 Lecturer: Shamiel Hashim 1 lecturer:Shamiel Hashim second semester Prepared by: amani Omer.
© Janice Regan, CMPT 128, Jan CMPT 128: Introduction to Computing Science for Engineering Students Integer Data representation Addition and Multiplication.
© by Kenneth H. Rosen, Discrete Mathematics & its Applications, Sixth Edition, Mc Graw-Hill, 2007 Chapter 3 (Part 3): The Fundamentals: Algorithms, the.
February 24, 2015Applied Discrete Mathematics Week 4: Number Theory 1 Modular Arithmetic Let a be an integer and m be a positive integer. We denote by.
CS105 INTRODUCTION TO COMPUTER CONCEPTS BINARY VALUES & NUMBER SYSTEMS Instructor: Cuong (Charlie) Pham.
CSNB143 – Discrete Structure
MATH 224 – Discrete Mathematics
Chapter 3: The Fundamentals: Algorithms, the Integers, and Matrices
Nama : Jehan binti Jamian No.matrik : UK Discrete Mathematics Area of mathematics that deals with the study of discrete objects. Discusses languages.
Relationships Between Structures “→” ≝ “Can be defined in terms of” Programs Groups Proofs Trees Complex numbers Operators Propositions Graphs Real.
CompSci 102 Discrete Math for Computer Science February 16, 2012 Prof. Rodger.
1-1 Lecture 1 Class Overview and Appendix A -- Number Systems.
Chapter 2 Binary Values and Number Systems. 2 2 Natural Numbers Zero and any number obtained by repeatedly adding one to it. Examples: 100, 0, 45645,
ECE 331 – Digital System Design
Chapter 7—Objects and Memory The Art and Science of An Introduction to Computer Science ERIC S. ROBERTS Java Objects and Memory C H A P T E R 7 Yea, from.
Chapter 2: The Logic of Compound Statements 2.5 Application: Number Systems and Circuits for Addition 1 Counting in binary is just like counting in decimal.
Introduction to Computing Dr. Nadeem A Khan. Lecture 10.
Lecture 2 Binary Values and Number Systems. The number 943 is an example of a number written in positional notation. The relative positions of the digits.
Number Systems Binary to Decimal Octal to Decimal Hexadecimal to Decimal Binary to Octal Binary to Hexadecimal Two’s Complement.
Chapter Integers and Algorithms Representations of integers
Discrete Mathematics ( 離散數學 ) Ming-Jer Tsai. Outline What is Discrete Mathematics? Why learn Discrete Mathematics? What will be taught in the class? How.
Foundations of Discrete Mathematics Chapter 4 By Dr. Dalia M. Gil, Ph.D.
Module #9 – Number Theory 1/5/ Algorithms, The Integers and Matrices.
Chapter 2 Binary Values and Number Systems Chapter Goals Distinguish among categories of numbers Describe positional notation Convert numbers in.
Greatest Common Divisors & Least Common Multiples  Definition 4 Let a and b be integers, not both zero. The largest integer d such that d|a and d|b is.
ECE 362 Microprocessor Systems and Interfacing ©5-1 Lecture 1 Hexadecimal Computation Outline n Decimal n Binary n Octal n Hexadecimal.
1 Discrete Structures – CNS2300 Text Discrete Mathematics and Its Applications Kenneth H. Rosen (5 th Edition) Chapter 2 The Fundamentals: Algorithms,
1.  This course covers the mathematical foundations of computer science and engineering. It provides an introduction to elementary concepts in mathematics.
Number Theory Lecture 1 Text book: Discrete Mathematics and its Applications, 7 th Edition.
Binary Values. Numbers Natural Numbers Zero and any number obtained by repeatedly adding one to it. Examples: 100, 0, 45645, 32 Negative Numbers.
Prepared By: Norakmar Binti Mohd Nadzari CHAPTER 2 ARITHMETIC AND LOGIC UNIT.
Proof And Strategies Chapter 2. Lecturer: Amani Mahajoub Omer Department of Computer Science and Software Engineering Discrete Structures Definition Discrete.
Number Theory. Introduction to Number Theory Number theory is about integers and their properties. We will start with the basic principles of divisibility,
Lecturer: Santokh Singh
CSE15 Discrete Mathematics 03/15/17
Introduction to Computing
COMPUTER ORGANIZATION
Positional Notation A positional or place-value notation is a numeral system in which each position is related to the next by a constant multiplier, called.
Integer Real Numbers Character Boolean Memory Address CPU Data Types
Copyright (c) 2004 Professor Keith W. Noe
CSE 102 Introduction to Computer Engineering
CSE 504 Discrete Mathematics & Foundations of Computer Science
Number Theory and Cryptography
University of Gujrat Department of Computer Science
Binary, Octal and Hex Numbers Copyright Thaddeus Konar
Textbook Computer Science Illuminated 4th Edition  By Nell Dale, John Lewis - Jones and Bartlett Publishers 11/20/2018.
Binary, Octal and Hex Numbers Copyright Thaddeus Konar
Modular Arithmetic and Change of Base
Digital Logic Design (CSNB163)
ECE 301 – Digital Electronics
COMS 161 Introduction to Computing
Number Theory.
Presentation transcript:

1 Discrete Structures ICS-252 Dr. Ahmed Youssef 1

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

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, ) are not discrete. 3

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. 4

Representations of Integers 5

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. 6

7

# 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. Introduction # 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

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

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 = a k b k + a k-1 b k-1 +…+a 1 b + a 0 where k is a nonnegative integer, a 0, a 1,…, a k are nonnegative Integers less than b and a k ≠0. Base b expansion of n The base b expansion of n is denoted by: (a k a k-1 …a 1 a 0 ) 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 = a k b k + a k-1 b k-1 +…+a 1 b + a 0 where b=16 (2AE0B) 16 =2 x x x x =(175627) 10 11

Example : What is the decimal expansion of the binary expansion of ( ) 2 Sol: we will use the expansion n = a k b k + a k-1 b k-1 +…+a 1 b + a 0 where b=2 ( ) 2 =1 x x x x x x x x x 2 0 =(351) 10 12

Example : Find the base 8 expansion of (12345) = 8 x = 8 x = 8 x = 8 x = 8 x (12345) 10 =(30071) 8 13

Example : Find the base 2 expansion of (241) (241) 10 =( ) 2 14

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

16 nOctalHexadecimal A1010 B1011 C1100 D1101 E1110 F1111 To convert a binary number to octal or hexadecimal numbers.

Example : What is the hexadecimal expansion of the binary expansion of ( ) 2 Sol: ( ) 2 = ( ) 2 =(15F) Example : What is the octa expansion of the binary expansion of ( ) 2 Sol: ( ) 2 = ( ) 2 =(537) 8

Example : What is the binary expansion of the (A10D) 16 Sol: (A10D) 16 =( ) 2 18 Example : What is the binary expansion of (537) 8 Sol: (537) 8 = ( ) 2

Find the octal and hexadecimal expansions of ( ) 2 Find the binary expansions of (765) 8 and (A8D)

20