![Page 1: CSE 20 - Lecture 4: Introduction to Boolean algebra · Sometimes called Boolean representation after English mathematician George Boole. Computer talks in this language. CSE 20: Lecture4](https://reader034.vdocument.in/reader034/viewer/2022051916/600881e06e6d6e075b730856/html5/thumbnails/1.jpg)
CSE 20Lecture 4: Introduction to Boolean algebra
CSE 20: Lecture4
![Page 2: CSE 20 - Lecture 4: Introduction to Boolean algebra · Sometimes called Boolean representation after English mathematician George Boole. Computer talks in this language. CSE 20: Lecture4](https://reader034.vdocument.in/reader034/viewer/2022051916/600881e06e6d6e075b730856/html5/thumbnails/2.jpg)
Reminder
First quiz will be on Friday (17th January) in class.
It is a paper quiz.
Syllabus is all that has been done till Wednesday.
If you want you may bring a calculator
CSE 20: Lecture4
![Page 3: CSE 20 - Lecture 4: Introduction to Boolean algebra · Sometimes called Boolean representation after English mathematician George Boole. Computer talks in this language. CSE 20: Lecture4](https://reader034.vdocument.in/reader034/viewer/2022051916/600881e06e6d6e075b730856/html5/thumbnails/3.jpg)
Base b representation
Digits: 0, 1, . . . , b− 1
Represented as [x]b. (Like [22001]3)
Base b representation of a number x is the unique way ofwriting
x = x0 ∗ b0 + x1 ∗ b1 + · · ·+ xk ∗ bk,
where x0, x1, . . . , xk ∈ {0, 1, . . . , (b− 1)}
CSE 20: Lecture4
![Page 4: CSE 20 - Lecture 4: Introduction to Boolean algebra · Sometimes called Boolean representation after English mathematician George Boole. Computer talks in this language. CSE 20: Lecture4](https://reader034.vdocument.in/reader034/viewer/2022051916/600881e06e6d6e075b730856/html5/thumbnails/4.jpg)
Base b representation
Digits: 0, 1, . . . , b− 1
Represented as [x]b. (Like [22001]3)
Base b representation of a number x is the unique way ofwriting
x = x0 ∗ b0 + x1 ∗ b1 + · · ·+ xk ∗ bk,
where x0, x1, . . . , xk ∈ {0, 1, . . . , (b− 1)}
CSE 20: Lecture4
![Page 5: CSE 20 - Lecture 4: Introduction to Boolean algebra · Sometimes called Boolean representation after English mathematician George Boole. Computer talks in this language. CSE 20: Lecture4](https://reader034.vdocument.in/reader034/viewer/2022051916/600881e06e6d6e075b730856/html5/thumbnails/5.jpg)
Base b representation
Digits: 0, 1, . . . , b− 1
Represented as [x]b. (Like [22001]3)
Base b representation of a number x is the unique way ofwriting
x = x0 ∗ b0 + x1 ∗ b1 + · · ·+ xk ∗ bk,
where x0, x1, . . . , xk ∈ {0, 1, . . . , (b− 1)}
CSE 20: Lecture4
![Page 6: CSE 20 - Lecture 4: Introduction to Boolean algebra · Sometimes called Boolean representation after English mathematician George Boole. Computer talks in this language. CSE 20: Lecture4](https://reader034.vdocument.in/reader034/viewer/2022051916/600881e06e6d6e075b730856/html5/thumbnails/6.jpg)
Base b representation
Digits: 0, 1, . . . , b− 1
Represented as [x]b. (Like [22001]3)
Base b representation of a number x is the unique way ofwriting
x = x0 ∗ b0 + x1 ∗ b1 + · · ·+ xk ∗ bk,
where x0, x1, . . . , xk ∈ {0, 1, . . . , (b− 1)}
CSE 20: Lecture4
![Page 7: CSE 20 - Lecture 4: Introduction to Boolean algebra · Sometimes called Boolean representation after English mathematician George Boole. Computer talks in this language. CSE 20: Lecture4](https://reader034.vdocument.in/reader034/viewer/2022051916/600881e06e6d6e075b730856/html5/thumbnails/7.jpg)
Algorithm for finding representaation in base b
We can find a representation in base b using GREEDYMETHOD.
CSE 20: Lecture4
![Page 8: CSE 20 - Lecture 4: Introduction to Boolean algebra · Sometimes called Boolean representation after English mathematician George Boole. Computer talks in this language. CSE 20: Lecture4](https://reader034.vdocument.in/reader034/viewer/2022051916/600881e06e6d6e075b730856/html5/thumbnails/8.jpg)
Unique representation in base “b”
Can an integer be written in base b in two different ways?
Answer may be obvious but we need to prove itmathematically.
CSE 20: Lecture4
![Page 9: CSE 20 - Lecture 4: Introduction to Boolean algebra · Sometimes called Boolean representation after English mathematician George Boole. Computer talks in this language. CSE 20: Lecture4](https://reader034.vdocument.in/reader034/viewer/2022051916/600881e06e6d6e075b730856/html5/thumbnails/9.jpg)
Mathematical formulation of the unique
representation in base “b” problem
Let N be a number that be write in base b.
Let there be two different representation in base b:
N = x0 ∗ b0 + x1 ∗ b1 + · · ·+ xk ∗ bk,
N = y0 ∗ b0 + y1 ∗ b1 + · · ·+ yk ∗ bk.
Is it possible that there exists (∃) i such that xi 6= yi?
CSE 20: Lecture4
![Page 10: CSE 20 - Lecture 4: Introduction to Boolean algebra · Sometimes called Boolean representation after English mathematician George Boole. Computer talks in this language. CSE 20: Lecture4](https://reader034.vdocument.in/reader034/viewer/2022051916/600881e06e6d6e075b730856/html5/thumbnails/10.jpg)
Mathematical formulation of the unique
representation in base “b” problem
Let N be a number that be write in base b.
Let there be two different representation in base b:
N = x0 ∗ b0 + x1 ∗ b1 + · · ·+ xk ∗ bk,
N = y0 ∗ b0 + y1 ∗ b1 + · · ·+ yk ∗ bk.
Is it possible that there exists (∃) i such that xi 6= yi?
CSE 20: Lecture4
![Page 11: CSE 20 - Lecture 4: Introduction to Boolean algebra · Sometimes called Boolean representation after English mathematician George Boole. Computer talks in this language. CSE 20: Lecture4](https://reader034.vdocument.in/reader034/viewer/2022051916/600881e06e6d6e075b730856/html5/thumbnails/11.jpg)
Mathematical formulation of the unique
representation in base “b” problem
Let N be a number that be write in base b.
Let there be two different representation in base b:
N = x0 ∗ b0 + x1 ∗ b1 + · · ·+ xk ∗ bk,
N = y0 ∗ b0 + y1 ∗ b1 + · · ·+ yk ∗ bk.
Is it possible that there exists (∃) i such that xi 6= yi?
CSE 20: Lecture4
![Page 12: CSE 20 - Lecture 4: Introduction to Boolean algebra · Sometimes called Boolean representation after English mathematician George Boole. Computer talks in this language. CSE 20: Lecture4](https://reader034.vdocument.in/reader034/viewer/2022051916/600881e06e6d6e075b730856/html5/thumbnails/12.jpg)
Proof style
We prove by contradiction .
We assume that a number can be written in twodifferent ways
Then using this assumption we conclude thatsomething seriously wrong happens, like
2` < 2`
So we conclude that the original assumption waswrong.
CSE 20: Lecture4
![Page 13: CSE 20 - Lecture 4: Introduction to Boolean algebra · Sometimes called Boolean representation after English mathematician George Boole. Computer talks in this language. CSE 20: Lecture4](https://reader034.vdocument.in/reader034/viewer/2022051916/600881e06e6d6e075b730856/html5/thumbnails/13.jpg)
Proof style
We prove by contradiction .
We assume that a number can be written in twodifferent ways
Then using this assumption we conclude thatsomething seriously wrong happens, like
2` < 2`
So we conclude that the original assumption waswrong.
CSE 20: Lecture4
![Page 14: CSE 20 - Lecture 4: Introduction to Boolean algebra · Sometimes called Boolean representation after English mathematician George Boole. Computer talks in this language. CSE 20: Lecture4](https://reader034.vdocument.in/reader034/viewer/2022051916/600881e06e6d6e075b730856/html5/thumbnails/14.jpg)
Proof style
We prove by contradiction .
We assume that a number can be written in twodifferent ways
Then using this assumption we conclude thatsomething seriously wrong happens, like
2` < 2`
So we conclude that the original assumption waswrong.
CSE 20: Lecture4
![Page 15: CSE 20 - Lecture 4: Introduction to Boolean algebra · Sometimes called Boolean representation after English mathematician George Boole. Computer talks in this language. CSE 20: Lecture4](https://reader034.vdocument.in/reader034/viewer/2022051916/600881e06e6d6e075b730856/html5/thumbnails/15.jpg)
Proof style
We prove by contradiction .
We assume that a number can be written in twodifferent ways
Then using this assumption we conclude thatsomething seriously wrong happens, like
2` < 2`
So we conclude that the original assumption waswrong.
CSE 20: Lecture4
![Page 16: CSE 20 - Lecture 4: Introduction to Boolean algebra · Sometimes called Boolean representation after English mathematician George Boole. Computer talks in this language. CSE 20: Lecture4](https://reader034.vdocument.in/reader034/viewer/2022051916/600881e06e6d6e075b730856/html5/thumbnails/16.jpg)
Mathematical logic
Every statement (proposition) is either TRUE orFALSE.
A statement can have an unspecified term, calledvariable.
Statements are connected to each other by 5connectives: AND, OR, NOT, IMPLIES and IFF.
CSE 20: Lecture4
![Page 17: CSE 20 - Lecture 4: Introduction to Boolean algebra · Sometimes called Boolean representation after English mathematician George Boole. Computer talks in this language. CSE 20: Lecture4](https://reader034.vdocument.in/reader034/viewer/2022051916/600881e06e6d6e075b730856/html5/thumbnails/17.jpg)
Mathematical logic
Every statement (proposition) is either TRUE orFALSE.
A statement can have an unspecified term, calledvariable.
Statements are connected to each other by 5connectives: AND, OR, NOT, IMPLIES and IFF.
CSE 20: Lecture4
![Page 18: CSE 20 - Lecture 4: Introduction to Boolean algebra · Sometimes called Boolean representation after English mathematician George Boole. Computer talks in this language. CSE 20: Lecture4](https://reader034.vdocument.in/reader034/viewer/2022051916/600881e06e6d6e075b730856/html5/thumbnails/18.jpg)
Mathematical logic
Every statement (proposition) is either TRUE orFALSE.
A statement can have an unspecified term, calledvariable.
Statements are connected to each other by 5connectives: AND, OR, NOT, IMPLIES and IFF.
CSE 20: Lecture4
![Page 19: CSE 20 - Lecture 4: Introduction to Boolean algebra · Sometimes called Boolean representation after English mathematician George Boole. Computer talks in this language. CSE 20: Lecture4](https://reader034.vdocument.in/reader034/viewer/2022051916/600881e06e6d6e075b730856/html5/thumbnails/19.jpg)
The IMPLIES ( =⇒ )
p q p =⇒ qF F TF T TT F FT T T
CSE 20: Lecture4
![Page 20: CSE 20 - Lecture 4: Introduction to Boolean algebra · Sometimes called Boolean representation after English mathematician George Boole. Computer talks in this language. CSE 20: Lecture4](https://reader034.vdocument.in/reader034/viewer/2022051916/600881e06e6d6e075b730856/html5/thumbnails/20.jpg)
The AND (∧)
p q p ∧ qF F FF T FT F FT T T
CSE 20: Lecture4
![Page 21: CSE 20 - Lecture 4: Introduction to Boolean algebra · Sometimes called Boolean representation after English mathematician George Boole. Computer talks in this language. CSE 20: Lecture4](https://reader034.vdocument.in/reader034/viewer/2022051916/600881e06e6d6e075b730856/html5/thumbnails/21.jpg)
The OR (∨)
p q p ∨ qF F FF T TT F TT T T
CSE 20: Lecture4
![Page 22: CSE 20 - Lecture 4: Introduction to Boolean algebra · Sometimes called Boolean representation after English mathematician George Boole. Computer talks in this language. CSE 20: Lecture4](https://reader034.vdocument.in/reader034/viewer/2022051916/600881e06e6d6e075b730856/html5/thumbnails/22.jpg)
The IMPLIES ( =⇒ )
p q p =⇒ qF F TF T TT F FT T T
CSE 20: Lecture4
![Page 23: CSE 20 - Lecture 4: Introduction to Boolean algebra · Sometimes called Boolean representation after English mathematician George Boole. Computer talks in this language. CSE 20: Lecture4](https://reader034.vdocument.in/reader034/viewer/2022051916/600881e06e6d6e075b730856/html5/thumbnails/23.jpg)
The IFF (⇐⇒ )
p q p ⇐⇒ qF F TF T FT F FT T T
CSE 20: Lecture4
![Page 24: CSE 20 - Lecture 4: Introduction to Boolean algebra · Sometimes called Boolean representation after English mathematician George Boole. Computer talks in this language. CSE 20: Lecture4](https://reader034.vdocument.in/reader034/viewer/2022051916/600881e06e6d6e075b730856/html5/thumbnails/24.jpg)
The NOT (¬)
p ¬pF TT F
CSE 20: Lecture4
![Page 25: CSE 20 - Lecture 4: Introduction to Boolean algebra · Sometimes called Boolean representation after English mathematician George Boole. Computer talks in this language. CSE 20: Lecture4](https://reader034.vdocument.in/reader034/viewer/2022051916/600881e06e6d6e075b730856/html5/thumbnails/25.jpg)
Universality
Every logical sentance can be written using the AND, OR,NOT, IMPLIES, IFF and two more symbols:
There exists, ∃
For all, ∀
CSE 20: Lecture4
![Page 26: CSE 20 - Lecture 4: Introduction to Boolean algebra · Sometimes called Boolean representation after English mathematician George Boole. Computer talks in this language. CSE 20: Lecture4](https://reader034.vdocument.in/reader034/viewer/2022051916/600881e06e6d6e075b730856/html5/thumbnails/26.jpg)
Proof by contradiction
p q p =⇒ qF F TF T TT F FT T T
CSE 20: Lecture4
![Page 27: CSE 20 - Lecture 4: Introduction to Boolean algebra · Sometimes called Boolean representation after English mathematician George Boole. Computer talks in this language. CSE 20: Lecture4](https://reader034.vdocument.in/reader034/viewer/2022051916/600881e06e6d6e075b730856/html5/thumbnails/27.jpg)
Base b representation
Digits: 0, 1, . . . , b− 1
Represented as [x]b. (Like [22001]3)
Base b representation of a number x is the unique way ofwriting
x = x0 ∗ b0 + x1 ∗ b1 + · · ·+ xk ∗ bk,
where x0, x1, . . . , xk ∈ {0, 1, . . . , (b− 1)}
CSE 20: Lecture4
![Page 28: CSE 20 - Lecture 4: Introduction to Boolean algebra · Sometimes called Boolean representation after English mathematician George Boole. Computer talks in this language. CSE 20: Lecture4](https://reader034.vdocument.in/reader034/viewer/2022051916/600881e06e6d6e075b730856/html5/thumbnails/28.jpg)
Base b representation
Digits: 0, 1, . . . , b− 1
Represented as [x]b. (Like [22001]3)
Base b representation of a number x is the unique way ofwriting
x = x0 ∗ b0 + x1 ∗ b1 + · · ·+ xk ∗ bk,
where x0, x1, . . . , xk ∈ {0, 1, . . . , (b− 1)}
CSE 20: Lecture4
![Page 29: CSE 20 - Lecture 4: Introduction to Boolean algebra · Sometimes called Boolean representation after English mathematician George Boole. Computer talks in this language. CSE 20: Lecture4](https://reader034.vdocument.in/reader034/viewer/2022051916/600881e06e6d6e075b730856/html5/thumbnails/29.jpg)
Base b representation
Digits: 0, 1, . . . , b− 1
Represented as [x]b. (Like [22001]3)
Base b representation of a number x is the unique way ofwriting
x = x0 ∗ b0 + x1 ∗ b1 + · · ·+ xk ∗ bk,
where x0, x1, . . . , xk ∈ {0, 1, . . . , (b− 1)}
CSE 20: Lecture4
![Page 30: CSE 20 - Lecture 4: Introduction to Boolean algebra · Sometimes called Boolean representation after English mathematician George Boole. Computer talks in this language. CSE 20: Lecture4](https://reader034.vdocument.in/reader034/viewer/2022051916/600881e06e6d6e075b730856/html5/thumbnails/30.jpg)
Base b representation
Digits: 0, 1, . . . , b− 1
Represented as [x]b. (Like [22001]3)
Base b representation of a number x is the unique way ofwriting
x = x0 ∗ b0 + x1 ∗ b1 + · · ·+ xk ∗ bk,
where x0, x1, . . . , xk ∈ {0, 1, . . . , (b− 1)}
CSE 20: Lecture4
![Page 31: CSE 20 - Lecture 4: Introduction to Boolean algebra · Sometimes called Boolean representation after English mathematician George Boole. Computer talks in this language. CSE 20: Lecture4](https://reader034.vdocument.in/reader034/viewer/2022051916/600881e06e6d6e075b730856/html5/thumbnails/31.jpg)
Binary Representation
When one represent a number in base 2 it is calledbinary representation.
Sometimes called Boolean representation after Englishmathematician George Boole.
Computer talks in this language.
CSE 20: Lecture4
![Page 32: CSE 20 - Lecture 4: Introduction to Boolean algebra · Sometimes called Boolean representation after English mathematician George Boole. Computer talks in this language. CSE 20: Lecture4](https://reader034.vdocument.in/reader034/viewer/2022051916/600881e06e6d6e075b730856/html5/thumbnails/32.jpg)
Binary Representation
When one represent a number in base 2 it is calledbinary representation.
Sometimes called Boolean representation after Englishmathematician George Boole.
Computer talks in this language.
CSE 20: Lecture4
![Page 33: CSE 20 - Lecture 4: Introduction to Boolean algebra · Sometimes called Boolean representation after English mathematician George Boole. Computer talks in this language. CSE 20: Lecture4](https://reader034.vdocument.in/reader034/viewer/2022051916/600881e06e6d6e075b730856/html5/thumbnails/33.jpg)
Binary Representation
When one represent a number in base 2 it is calledbinary representation.
Sometimes called Boolean representation after Englishmathematician George Boole.
Computer talks in this language.
CSE 20: Lecture4
![Page 34: CSE 20 - Lecture 4: Introduction to Boolean algebra · Sometimes called Boolean representation after English mathematician George Boole. Computer talks in this language. CSE 20: Lecture4](https://reader034.vdocument.in/reader034/viewer/2022051916/600881e06e6d6e075b730856/html5/thumbnails/34.jpg)
The world of the computers
Every number is stored in binary
Every number has a certain length (depending of theregister size).
For example:If the register size is 8 then 1 is stored as 00000001.
Cannot store more than a certain number of digits.
CSE 20: Lecture4
![Page 35: CSE 20 - Lecture 4: Introduction to Boolean algebra · Sometimes called Boolean representation after English mathematician George Boole. Computer talks in this language. CSE 20: Lecture4](https://reader034.vdocument.in/reader034/viewer/2022051916/600881e06e6d6e075b730856/html5/thumbnails/35.jpg)
The world of the computers
Every number is stored in binary
Every number has a certain length (depending of theregister size).
For example:If the register size is 8 then 1 is stored as 00000001.
Cannot store more than a certain number of digits.
CSE 20: Lecture4
![Page 36: CSE 20 - Lecture 4: Introduction to Boolean algebra · Sometimes called Boolean representation after English mathematician George Boole. Computer talks in this language. CSE 20: Lecture4](https://reader034.vdocument.in/reader034/viewer/2022051916/600881e06e6d6e075b730856/html5/thumbnails/36.jpg)
The world of the computers
Every number is stored in binary
Every number has a certain length (depending of theregister size).
For example:If the register size is 8 then 1 is stored as 00000001.
Cannot store more than a certain number of digits.
CSE 20: Lecture4
![Page 37: CSE 20 - Lecture 4: Introduction to Boolean algebra · Sometimes called Boolean representation after English mathematician George Boole. Computer talks in this language. CSE 20: Lecture4](https://reader034.vdocument.in/reader034/viewer/2022051916/600881e06e6d6e075b730856/html5/thumbnails/37.jpg)
The world of the computers
Every number is stored in binary
Every number has a certain length (depending of theregister size).
For example:If the register size is 8 then 1 is stored as 00000001.
Cannot store more than a certain number of digits.
CSE 20: Lecture4
![Page 38: CSE 20 - Lecture 4: Introduction to Boolean algebra · Sometimes called Boolean representation after English mathematician George Boole. Computer talks in this language. CSE 20: Lecture4](https://reader034.vdocument.in/reader034/viewer/2022051916/600881e06e6d6e075b730856/html5/thumbnails/38.jpg)
Computer Addition
Let the register size in a computer is 8 bits.
Let x = 11111111 and y = 00000001
What is x + y?Ans: x + y = 100000000.
But the computer sees only the last 8 digits. So it sees00000000.
CSE 20: Lecture4
![Page 39: CSE 20 - Lecture 4: Introduction to Boolean algebra · Sometimes called Boolean representation after English mathematician George Boole. Computer talks in this language. CSE 20: Lecture4](https://reader034.vdocument.in/reader034/viewer/2022051916/600881e06e6d6e075b730856/html5/thumbnails/39.jpg)
Computer Addition
Let the register size in a computer is 8 bits.
Let x = 11111111 and y = 00000001
What is x + y?
Ans: x + y = 100000000.
But the computer sees only the last 8 digits. So it sees00000000.
CSE 20: Lecture4
![Page 40: CSE 20 - Lecture 4: Introduction to Boolean algebra · Sometimes called Boolean representation after English mathematician George Boole. Computer talks in this language. CSE 20: Lecture4](https://reader034.vdocument.in/reader034/viewer/2022051916/600881e06e6d6e075b730856/html5/thumbnails/40.jpg)
Computer Addition
Let the register size in a computer is 8 bits.
Let x = 11111111 and y = 00000001
What is x + y?Ans: x + y = 100000000.
But the computer sees only the last 8 digits. So it sees00000000.
CSE 20: Lecture4
![Page 41: CSE 20 - Lecture 4: Introduction to Boolean algebra · Sometimes called Boolean representation after English mathematician George Boole. Computer talks in this language. CSE 20: Lecture4](https://reader034.vdocument.in/reader034/viewer/2022051916/600881e06e6d6e075b730856/html5/thumbnails/41.jpg)
Computer Addition
Let the register size in a computer is 8 bits.
Let x = 11111111 and y = 00000001
What is x + y?Ans: x + y = 100000000.
But the computer sees only the last 8 digits. So it sees00000000.
CSE 20: Lecture4
![Page 42: CSE 20 - Lecture 4: Introduction to Boolean algebra · Sometimes called Boolean representation after English mathematician George Boole. Computer talks in this language. CSE 20: Lecture4](https://reader034.vdocument.in/reader034/viewer/2022051916/600881e06e6d6e075b730856/html5/thumbnails/42.jpg)
Boolean Algebra
Boolean Algebra has two basic digit: 1 and 0.
One can think of these as True and False
Used to represent data and used in logic.
CSE 20: Lecture4
![Page 43: CSE 20 - Lecture 4: Introduction to Boolean algebra · Sometimes called Boolean representation after English mathematician George Boole. Computer talks in this language. CSE 20: Lecture4](https://reader034.vdocument.in/reader034/viewer/2022051916/600881e06e6d6e075b730856/html5/thumbnails/43.jpg)
Boolean Algebra
Boolean Algebra has two basic digit: 1 and 0.
One can think of these as True and False
Used to represent data and used in logic.
CSE 20: Lecture4
![Page 44: CSE 20 - Lecture 4: Introduction to Boolean algebra · Sometimes called Boolean representation after English mathematician George Boole. Computer talks in this language. CSE 20: Lecture4](https://reader034.vdocument.in/reader034/viewer/2022051916/600881e06e6d6e075b730856/html5/thumbnails/44.jpg)
Boolean Algebra
Boolean Algebra has two basic digit: 1 and 0.
One can think of these as True and False
Used to represent data and used in logic.
CSE 20: Lecture4
![Page 45: CSE 20 - Lecture 4: Introduction to Boolean algebra · Sometimes called Boolean representation after English mathematician George Boole. Computer talks in this language. CSE 20: Lecture4](https://reader034.vdocument.in/reader034/viewer/2022051916/600881e06e6d6e075b730856/html5/thumbnails/45.jpg)
Boolean Algebra
Boolean Algebra has two basic digit: 1 and 0.
One can think of these as True and False
Used to represent data and used in logic.
CSE 20: Lecture4
![Page 46: CSE 20 - Lecture 4: Introduction to Boolean algebra · Sometimes called Boolean representation after English mathematician George Boole. Computer talks in this language. CSE 20: Lecture4](https://reader034.vdocument.in/reader034/viewer/2022051916/600881e06e6d6e075b730856/html5/thumbnails/46.jpg)
Representing Data as sets
Sets
For example:
Set of names of all studentsSet of letters in the english alphabetSet of digits. {0, 1, . . . , 9} or {0, 1}
Unordered Sets
Ordered Sets(Also called LIST/STRINGS/VECTORS)
CSE 20: Lecture4
![Page 47: CSE 20 - Lecture 4: Introduction to Boolean algebra · Sometimes called Boolean representation after English mathematician George Boole. Computer talks in this language. CSE 20: Lecture4](https://reader034.vdocument.in/reader034/viewer/2022051916/600881e06e6d6e075b730856/html5/thumbnails/47.jpg)
Representing Data as sets
SetsFor example:
Set of names of all students
Set of letters in the english alphabetSet of digits. {0, 1, . . . , 9} or {0, 1}
Unordered Sets
Ordered Sets(Also called LIST/STRINGS/VECTORS)
CSE 20: Lecture4
![Page 48: CSE 20 - Lecture 4: Introduction to Boolean algebra · Sometimes called Boolean representation after English mathematician George Boole. Computer talks in this language. CSE 20: Lecture4](https://reader034.vdocument.in/reader034/viewer/2022051916/600881e06e6d6e075b730856/html5/thumbnails/48.jpg)
Representing Data as sets
SetsFor example:
Set of names of all studentsSet of letters in the english alphabet
Set of digits. {0, 1, . . . , 9} or {0, 1}Unordered Sets
Ordered Sets(Also called LIST/STRINGS/VECTORS)
CSE 20: Lecture4
![Page 49: CSE 20 - Lecture 4: Introduction to Boolean algebra · Sometimes called Boolean representation after English mathematician George Boole. Computer talks in this language. CSE 20: Lecture4](https://reader034.vdocument.in/reader034/viewer/2022051916/600881e06e6d6e075b730856/html5/thumbnails/49.jpg)
Representing Data as sets
SetsFor example:
Set of names of all studentsSet of letters in the english alphabetSet of digits. {0, 1, . . . , 9} or {0, 1}
Unordered Sets
Ordered Sets(Also called LIST/STRINGS/VECTORS)
CSE 20: Lecture4
![Page 50: CSE 20 - Lecture 4: Introduction to Boolean algebra · Sometimes called Boolean representation after English mathematician George Boole. Computer talks in this language. CSE 20: Lecture4](https://reader034.vdocument.in/reader034/viewer/2022051916/600881e06e6d6e075b730856/html5/thumbnails/50.jpg)
Representing Data as sets
SetsFor example:
Set of names of all studentsSet of letters in the english alphabetSet of digits. {0, 1, . . . , 9} or {0, 1}
Unordered Sets
Ordered Sets(Also called LIST/STRINGS/VECTORS)
CSE 20: Lecture4
![Page 51: CSE 20 - Lecture 4: Introduction to Boolean algebra · Sometimes called Boolean representation after English mathematician George Boole. Computer talks in this language. CSE 20: Lecture4](https://reader034.vdocument.in/reader034/viewer/2022051916/600881e06e6d6e075b730856/html5/thumbnails/51.jpg)
Representing Data as sets
SetsFor example:
Set of names of all studentsSet of letters in the english alphabetSet of digits. {0, 1, . . . , 9} or {0, 1}
Unordered Sets
Ordered Sets(Also called LIST/STRINGS/VECTORS)
CSE 20: Lecture4
![Page 52: CSE 20 - Lecture 4: Introduction to Boolean algebra · Sometimes called Boolean representation after English mathematician George Boole. Computer talks in this language. CSE 20: Lecture4](https://reader034.vdocument.in/reader034/viewer/2022051916/600881e06e6d6e075b730856/html5/thumbnails/52.jpg)
Cartesian Product
Let A be a set
An is the set of all ordered subsets (with repetitions) Aof size n
{0, 1}n the set of all “strings” of 0 and 1 of length n.
CSE 20: Lecture4
![Page 53: CSE 20 - Lecture 4: Introduction to Boolean algebra · Sometimes called Boolean representation after English mathematician George Boole. Computer talks in this language. CSE 20: Lecture4](https://reader034.vdocument.in/reader034/viewer/2022051916/600881e06e6d6e075b730856/html5/thumbnails/53.jpg)
Cartesian Product
Let A be a set
An is the set of all ordered subsets (with repetitions) Aof size n
{0, 1}n the set of all “strings” of 0 and 1 of length n.
CSE 20: Lecture4
![Page 54: CSE 20 - Lecture 4: Introduction to Boolean algebra · Sometimes called Boolean representation after English mathematician George Boole. Computer talks in this language. CSE 20: Lecture4](https://reader034.vdocument.in/reader034/viewer/2022051916/600881e06e6d6e075b730856/html5/thumbnails/54.jpg)
Cartesian Product
Let A be a set
An is the set of all ordered subsets (with repetitions) Aof size n
{0, 1}n the set of all “strings” of 0 and 1 of length n.
CSE 20: Lecture4
![Page 55: CSE 20 - Lecture 4: Introduction to Boolean algebra · Sometimes called Boolean representation after English mathematician George Boole. Computer talks in this language. CSE 20: Lecture4](https://reader034.vdocument.in/reader034/viewer/2022051916/600881e06e6d6e075b730856/html5/thumbnails/55.jpg)
A little bit of counting
Q: How many elements are there in the set {0, 1}n?
Ans: 2n.
CSE 20: Lecture4
![Page 56: CSE 20 - Lecture 4: Introduction to Boolean algebra · Sometimes called Boolean representation after English mathematician George Boole. Computer talks in this language. CSE 20: Lecture4](https://reader034.vdocument.in/reader034/viewer/2022051916/600881e06e6d6e075b730856/html5/thumbnails/56.jpg)
A little bit of counting
Q: How many elements are there in the set {0, 1}n?Ans: 2n.
CSE 20: Lecture4