Lecture 1
Lecture 1
Lecture 1
Sets
Introduction
Discrete mathematics is the study of mathematical
structures and objects that are fundamentally
discrete rather than continuous.
Example: A={1,2,3} B
={1,2,3,4,5}
Infinite Set
Cardinality
Power Set
Power Set
Power Set
N-tuple
Cartesian Product
Cardinality of Cartesian
Product
Set Operations
Set Operations
Disjoint Sets
Cardinality of Union Sets
Bit Shifting
Left shift
Given a bit string 1 0 1 1 << 1 (a single left shift) results in the bit string 0110.
Thus, 1 0 1 1 << 1 = 0 1 1 0.
Logical right shift
Given 1011 >>> 1 = 0101. The least significant bit is dropped remaining 101.
then zero is appended as the most significant bit, resulting in 0101.
Arithmetic right shift
Given 1011 >> 1 = 1101. The least significant bit is dropped leaving the
bits 110. Now, instead of filling the vacuum with zero as the most
significant bit, arithmetic right shift uses a copy of the existing most
significant bit, to fill the vacuum resulting in 1101