SlideShare a Scribd company logo
1 of 38
Download to read offline
DR ATIF SHAHZAD
Fundamentals of
Computer Systems
IE-321
LECTURE #03
9/27/2018 2
Dr.AtifShahzad
RECAP
Digital System
What is a Numbering System?
Commonly Occurring Bases
Numbering System Examples
Base Conversion Procedure
Base Conversion
Number of Bits Required
Number of Elements represented
Q&A
9/27/2018 3
Dr.AtifShahzad
TODAY
Logic
Logical variables
Conditional, Negation, Contrapositive,Biconditional
AND, OR,NOT,XOR
Logic gates
TruthTables
Boolean Algebra
Examples
Q&A
Fundamentals of
Computer Systems
IE321
Logic
“ if the pool is warm, I’ll swim
What does it mean?
Yourinterpretations???
If the pool is cold, will I swim?
If I am swimming, pool is hot or cold?
If I am not swimming, does it mean that the pool is cold?
9/27/2018
Dr.AtifShahzad
5
Logic
“ if the pool is warm, I’ll swim
It is based on the validity of two
things, which can be mapped to
logical variables A and B :
A :The pool is warm.
B : I swim.
They’reeitherTrue or False
9/27/2018
Dr.AtifShahzad
6
A :
The pool is
warm.
B :
I swim.
Logic variables
“ if the pool is warm, I’ll swim
A :The pool is warm.
B : I swim.
A =True means a warm pool;
B = False means no swimming.
B can’t be half-true , because I can’t half swim.
9/27/2018
Dr.AtifShahzad
7
Conditional Operator
“ if the pool is warm, I’ll swim
Dependency between variables is expressed with →
, the conditional operator .
A → B is the idea that
A =True implies B =True :
So we have,
A → B : If the pool is warm, then I’ll
swim.
9/27/2018
Dr.AtifShahzad
8
Negation Operator
With more operators, different ideas can be expressed.
To negate ideas, we use ! , the negation
operator .
!A is the opposite of A
9/27/2018
Dr.AtifShahzad
9
! A : The pool is cold.
! B : I don’t swim.
A :
The pool is
warm.
B :
I swim.
Contrapositive Operator
GivenA → B and I didn’t swim,
what can be said
about the pool?
9/27/2018
Dr.AtifShahzad
10
Contrapositive Operator
GivenA → B and I didn’t swim,
what can be said about the pool?
A warm pool forces the swimming, so
without swimming, it’s impossible for
the pool to be warm
9/27/2018
Dr.AtifShahzad
11
Contrapositive Operator
GivenA → B and I didn’t swim,
what can be said about the pool?
A warm pool forces the swimming, so
without swimming, it’s impossible for
the pool to be warm
9/27/2018
Dr.AtifShahzad
12
Contrapositive Operator
Every conditional expression has a
contrapositive equivalent:
For any two variablesA and B,
9/27/2018
Dr.AtifShahzad
13
A → B is the same as
! B → ! A.
Contrapositive : Example
If you can’t write good code, you
haven’t read this article .
Its contrapositive is
if you read this article, you can write
good code .
9/27/2018
Dr.AtifShahzad
14
Biconditional
Be careful,
saying “if the pool is warm, I’ll swim”
doesn’t mean
I’ll only swim in warm water.
The statement promises nothing about
cold pools.
9/27/2018
Dr.AtifShahzad
15
In other words, A → B doesn’t mean B → A
Biconditional
To express both conditionals, use the biconditional :
A ↔ B : I’ll swim if and only if the
pool is warm.
9/27/2018
Dr.AtifShahzad
16
In other words, A → B doesn’t mean B → A
AND
A :You drank Cola.
B :You drank Juice.
A OR B :You drank.
A AND B :You drank mixing drinks.
A XOR B :You drank without mixing.
9/27/2018
Dr.AtifShahzad
17
OR,AND, XOR
A :You drank Cola.
B :You drank Juice.
A OR B :You drank.
A AND B :You drank mixing drinks.
A XOR B :You drank without mixing.
9/27/2018
Dr.AtifShahzad
18
Logical Operation:AND
9/27/2018
Dr.AtifShahzad
19
In a two variable case.
written asY=A.B
Dot (.) symbol is the common symbol of AND gate.
When both inputs are 1 then output is logically 1.
When both or any of the input is 0 then output is
logically 0.
We can also write AND Operation as:Y=AB
Logical Operation: OR
9/27/2018
Dr.AtifShahzad
20
In a two variable case.
written asY=A+B
Plus (+) symbol is the common symbol of OR gate.
When both inputs are 0 then output is logically 0.
When both inputs or any of one input is 1 then output
is logically 1.
Logical Operation: NOT
9/27/2018
Dr.AtifShahzad
21
It has only ONE input.
NOT Operation is also named as complementation.
It changes any input to it’s complement, like 1 to 0 &
0 to 1.
It is also written as A= Ā.
It is also called as INVERTER.
Logical Operation: XOR
9/27/2018
Dr.AtifShahzad
22
In a two variable case.
An XOR gate produces 0 if its both inputs are the
same, and 1 otherwise
Logical Operations with twoVariables
9/27/2018
Dr.AtifShahzad
23
Use of Logic Gates
9/27/2018
Dr.AtifShahzad
24
Use of Logic Gates
9/27/2018
Dr.AtifShahzad
25
Calculating 2+3=5
In binary 10+11=101
BooleanAlgebra: Some Rules
9/27/2018
Dr.AtifShahzad
26
Operations with 0 & 1
• X+0 = X
• X+1 = 1
Idempotent Laws
• X+X = X
• (X΄)΄ = X
Laws of Complementarity
• X+X΄ = 1
Operations with 0 & 1
• X.0 = 0
• X.1 = X
Idempotent Laws
• X.X = X
Laws of Complementarity
• X.X΄ = 0
BooleanAlgebra: Some Rules
9/27/2018
Dr.AtifShahzad
27
Commutative Laws
• X.Y =Y.X
Associative Laws
• (XY)Z = X(YZ) = XYZ
Distributive Laws
• X+YZ = (X+Y)(X+Z)
SimplificationTheorems
• (X+Y)(X+Y΄) = X
• X(X+Y) = X
• XY΄+y = X+Y
BooleanAlgebra: Some Rules
9/27/2018
Dr.AtifShahzad
28
Commutative Laws
• X+Y =Y+X
Associative Laws
• (X+Y)+Z = X+(Y+Z)
Distributive Law
• X(Y+Z) = XY+XZ
SimplificationTheorems
• XY + XY΄ = X
• X+XY = X
• (X+Y΄)Y = XY
BooleanAlgebra: DeMorgan
9/27/2018
Dr.AtifShahzad
29
DEMORGAN’S Law
• (X+Y+Z+…)΄ = X΄Y΄Z΄
DEMORGAN’S Law
• (XYZ…)΄ = X΄+Y΄ +Z΄+…
Example
9/27/2018
Dr.AtifShahzad
30
A server crashes if it’s overheating while
the air conditioning is off.
It also crashes if it’s overheating and its
chassis cooler fails.
In which conditions does the server work?
Example (contd.)
9/27/2018
Dr.AtifShahzad
31
A : Server overheats.
B :Air conditioning off.
C : Chassis cooler fails.
D : Server crashes.
Example (contd.)
9/27/2018
Dr.AtifShahzad
32
(A AND B) OR (A AND C)→ D
A : Server
overheats.
B : Air
conditioning off.
C : Chassis
cooler fails.
D : Server
crashes.
Example (contd.)
9/27/2018
Dr.AtifShahzad
33
(A AND B) OR (A AND C)→ D
ByAssociativity,
A AND (B OR C) → D
A : Server
overheats.
B : Air
conditioning off.
C : Chassis
cooler fails.
D : Server
crashes.
Example (contd.)
9/27/2018
Dr.AtifShahzad
34
(A AND B) OR (A AND C)→ D
ByAssociativity,
A AND (B OR C) → D
A : Server
overheats.
B : Air
conditioning off.
C : Chassis
cooler fails.
D : Server
crashes.
The server works when ( ! D ). The contrapositive reads:
(! D → ! (A AND (B OR C))
Example (contd.)
9/27/2018
Dr.AtifShahzad
35
A : Server
overheats.
B : Air
conditioning off.
C : Chassis
cooler fails.
D : Server
crashes.
(! D → ! (A AND (B OR C))
By Demorgan’s law,
! D → !A OR ! (B OR C)
Again applying DeMorgan’s law
! D → !A OR ( ! B AND ! C)
Example (contd.)
9/27/2018
Dr.AtifShahzad
36
A : Server
overheats.
B : Air
conditioning off.
C : Chassis
cooler fails.
D : Server
crashes.
! D → !A OR ( ! B AND ! C)
This expression tells us that
whenever the server works,
either ! A
(it’s not overheating),
or ! BAND ! C
(both air conditioning and chassis cooler
are working).
9/27/2018
Dr.AtifShahzad
39
NEVER hesitate to
contact should you
have any question
Dr.Atif Shahzad

More Related Content

More from Atif Shahzad

Dr atif shahzad_sys_ management_lecture_outsourcing managing inter organizati...
Dr atif shahzad_sys_ management_lecture_outsourcing managing inter organizati...Dr atif shahzad_sys_ management_lecture_outsourcing managing inter organizati...
Dr atif shahzad_sys_ management_lecture_outsourcing managing inter organizati...
Atif Shahzad
 

More from Atif Shahzad (20)

Dr atif shahzad_engg_ management_module_01
Dr atif shahzad_engg_ management_module_01Dr atif shahzad_engg_ management_module_01
Dr atif shahzad_engg_ management_module_01
 
Dr atif shahzad_engg_ management_lecture_inventory models
Dr atif shahzad_engg_ management_lecture_inventory modelsDr atif shahzad_engg_ management_lecture_inventory models
Dr atif shahzad_engg_ management_lecture_inventory models
 
Dr atif shahzad_engg_ management_lecture_inventory management
Dr atif shahzad_engg_ management_lecture_inventory managementDr atif shahzad_engg_ management_lecture_inventory management
Dr atif shahzad_engg_ management_lecture_inventory management
 
Dr atif shahzad_engg_ management_cost management
Dr atif shahzad_engg_ management_cost managementDr atif shahzad_engg_ management_cost management
Dr atif shahzad_engg_ management_cost management
 
Dr atif shahzad_sys_ management_lecture_outsourcing managing inter organizati...
Dr atif shahzad_sys_ management_lecture_outsourcing managing inter organizati...Dr atif shahzad_sys_ management_lecture_outsourcing managing inter organizati...
Dr atif shahzad_sys_ management_lecture_outsourcing managing inter organizati...
 
Lecture17 ie321 dr_atifshahzad_js
Lecture17 ie321 dr_atifshahzad_jsLecture17 ie321 dr_atifshahzad_js
Lecture17 ie321 dr_atifshahzad_js
 
Lecture16 ie321 dr_atifshahzad_css
Lecture16 ie321 dr_atifshahzad_cssLecture16 ie321 dr_atifshahzad_css
Lecture16 ie321 dr_atifshahzad_css
 
Lecture15 ie321 dr_atifshahzad_html
Lecture15 ie321 dr_atifshahzad_htmlLecture15 ie321 dr_atifshahzad_html
Lecture15 ie321 dr_atifshahzad_html
 
Lecture14 ie321 dr_atifshahzad -algorithmic thinking part2
Lecture14 ie321 dr_atifshahzad -algorithmic thinking part2Lecture14 ie321 dr_atifshahzad -algorithmic thinking part2
Lecture14 ie321 dr_atifshahzad -algorithmic thinking part2
 
Lecture13 ie321 dr_atifshahzad -algorithmic thinking
Lecture13 ie321 dr_atifshahzad -algorithmic thinkingLecture13 ie321 dr_atifshahzad -algorithmic thinking
Lecture13 ie321 dr_atifshahzad -algorithmic thinking
 
Lecture12 ie321 dr_atifshahzad - networks
Lecture12 ie321 dr_atifshahzad - networksLecture12 ie321 dr_atifshahzad - networks
Lecture12 ie321 dr_atifshahzad - networks
 
Lecture11 ie321 dr_atifshahzad -security
Lecture11 ie321 dr_atifshahzad -securityLecture11 ie321 dr_atifshahzad -security
Lecture11 ie321 dr_atifshahzad -security
 
Lecture10 ie321 dr_atifshahzad
Lecture10 ie321 dr_atifshahzadLecture10 ie321 dr_atifshahzad
Lecture10 ie321 dr_atifshahzad
 
Lecture08 ie321 dr_atifshahzad
Lecture08 ie321 dr_atifshahzadLecture08 ie321 dr_atifshahzad
Lecture08 ie321 dr_atifshahzad
 
Lecture07 ie321 dr_atifshahzad
Lecture07 ie321 dr_atifshahzadLecture07 ie321 dr_atifshahzad
Lecture07 ie321 dr_atifshahzad
 
Lecture06 ie321 dr_atifshahzad
Lecture06 ie321 dr_atifshahzadLecture06 ie321 dr_atifshahzad
Lecture06 ie321 dr_atifshahzad
 
Lecture05 ie321 dr_atifshahzad
Lecture05 ie321 dr_atifshahzadLecture05 ie321 dr_atifshahzad
Lecture05 ie321 dr_atifshahzad
 
Lecture04 ie321 dr_atifshahzad
Lecture04 ie321 dr_atifshahzadLecture04 ie321 dr_atifshahzad
Lecture04 ie321 dr_atifshahzad
 
Lecture02 ie321 dr_atifshahzad
Lecture02 ie321 dr_atifshahzadLecture02 ie321 dr_atifshahzad
Lecture02 ie321 dr_atifshahzad
 
Lecture01 ie321 dr_atifshahzad
Lecture01 ie321 dr_atifshahzadLecture01 ie321 dr_atifshahzad
Lecture01 ie321 dr_atifshahzad
 

Recently uploaded

%+27788225528 love spells in Boston Psychic Readings, Attraction spells,Bring...
%+27788225528 love spells in Boston Psychic Readings, Attraction spells,Bring...%+27788225528 love spells in Boston Psychic Readings, Attraction spells,Bring...
%+27788225528 love spells in Boston Psychic Readings, Attraction spells,Bring...
masabamasaba
 
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
Health
 
%+27788225528 love spells in new york Psychic Readings, Attraction spells,Bri...
%+27788225528 love spells in new york Psychic Readings, Attraction spells,Bri...%+27788225528 love spells in new york Psychic Readings, Attraction spells,Bri...
%+27788225528 love spells in new york Psychic Readings, Attraction spells,Bri...
masabamasaba
 

Recently uploaded (20)

%in tembisa+277-882-255-28 abortion pills for sale in tembisa
%in tembisa+277-882-255-28 abortion pills for sale in tembisa%in tembisa+277-882-255-28 abortion pills for sale in tembisa
%in tembisa+277-882-255-28 abortion pills for sale in tembisa
 
Architecture decision records - How not to get lost in the past
Architecture decision records - How not to get lost in the pastArchitecture decision records - How not to get lost in the past
Architecture decision records - How not to get lost in the past
 
WSO2Con2024 - WSO2's IAM Vision: Identity-Led Digital Transformation
WSO2Con2024 - WSO2's IAM Vision: Identity-Led Digital TransformationWSO2Con2024 - WSO2's IAM Vision: Identity-Led Digital Transformation
WSO2Con2024 - WSO2's IAM Vision: Identity-Led Digital Transformation
 
%+27788225528 love spells in Boston Psychic Readings, Attraction spells,Bring...
%+27788225528 love spells in Boston Psychic Readings, Attraction spells,Bring...%+27788225528 love spells in Boston Psychic Readings, Attraction spells,Bring...
%+27788225528 love spells in Boston Psychic Readings, Attraction spells,Bring...
 
%in kempton park+277-882-255-28 abortion pills for sale in kempton park
%in kempton park+277-882-255-28 abortion pills for sale in kempton park %in kempton park+277-882-255-28 abortion pills for sale in kempton park
%in kempton park+277-882-255-28 abortion pills for sale in kempton park
 
%in Rustenburg+277-882-255-28 abortion pills for sale in Rustenburg
%in Rustenburg+277-882-255-28 abortion pills for sale in Rustenburg%in Rustenburg+277-882-255-28 abortion pills for sale in Rustenburg
%in Rustenburg+277-882-255-28 abortion pills for sale in Rustenburg
 
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
 
VTU technical seminar 8Th Sem on Scikit-learn
VTU technical seminar 8Th Sem on Scikit-learnVTU technical seminar 8Th Sem on Scikit-learn
VTU technical seminar 8Th Sem on Scikit-learn
 
WSO2Con2024 - From Code To Cloud: Fast Track Your Cloud Native Journey with C...
WSO2Con2024 - From Code To Cloud: Fast Track Your Cloud Native Journey with C...WSO2Con2024 - From Code To Cloud: Fast Track Your Cloud Native Journey with C...
WSO2Con2024 - From Code To Cloud: Fast Track Your Cloud Native Journey with C...
 
%in Hazyview+277-882-255-28 abortion pills for sale in Hazyview
%in Hazyview+277-882-255-28 abortion pills for sale in Hazyview%in Hazyview+277-882-255-28 abortion pills for sale in Hazyview
%in Hazyview+277-882-255-28 abortion pills for sale in Hazyview
 
%in Soweto+277-882-255-28 abortion pills for sale in soweto
%in Soweto+277-882-255-28 abortion pills for sale in soweto%in Soweto+277-882-255-28 abortion pills for sale in soweto
%in Soweto+277-882-255-28 abortion pills for sale in soweto
 
tonesoftg
tonesoftgtonesoftg
tonesoftg
 
%+27788225528 love spells in new york Psychic Readings, Attraction spells,Bri...
%+27788225528 love spells in new york Psychic Readings, Attraction spells,Bri...%+27788225528 love spells in new york Psychic Readings, Attraction spells,Bri...
%+27788225528 love spells in new york Psychic Readings, Attraction spells,Bri...
 
WSO2CON 2024 - WSO2's Digital Transformation Journey with Choreo: A Platforml...
WSO2CON 2024 - WSO2's Digital Transformation Journey with Choreo: A Platforml...WSO2CON 2024 - WSO2's Digital Transformation Journey with Choreo: A Platforml...
WSO2CON 2024 - WSO2's Digital Transformation Journey with Choreo: A Platforml...
 
Crypto Cloud Review - How To Earn Up To $500 Per DAY Of Bitcoin 100% On AutoP...
Crypto Cloud Review - How To Earn Up To $500 Per DAY Of Bitcoin 100% On AutoP...Crypto Cloud Review - How To Earn Up To $500 Per DAY Of Bitcoin 100% On AutoP...
Crypto Cloud Review - How To Earn Up To $500 Per DAY Of Bitcoin 100% On AutoP...
 
Devoxx UK 2024 - Going serverless with Quarkus, GraalVM native images and AWS...
Devoxx UK 2024 - Going serverless with Quarkus, GraalVM native images and AWS...Devoxx UK 2024 - Going serverless with Quarkus, GraalVM native images and AWS...
Devoxx UK 2024 - Going serverless with Quarkus, GraalVM native images and AWS...
 
Artyushina_Guest lecture_YorkU CS May 2024.pptx
Artyushina_Guest lecture_YorkU CS May 2024.pptxArtyushina_Guest lecture_YorkU CS May 2024.pptx
Artyushina_Guest lecture_YorkU CS May 2024.pptx
 
Announcing Codolex 2.0 from GDK Software
Announcing Codolex 2.0 from GDK SoftwareAnnouncing Codolex 2.0 from GDK Software
Announcing Codolex 2.0 from GDK Software
 
WSO2CON 2024 - Cloud Native Middleware: Domain-Driven Design, Cell-Based Arch...
WSO2CON 2024 - Cloud Native Middleware: Domain-Driven Design, Cell-Based Arch...WSO2CON 2024 - Cloud Native Middleware: Domain-Driven Design, Cell-Based Arch...
WSO2CON 2024 - Cloud Native Middleware: Domain-Driven Design, Cell-Based Arch...
 
%in Harare+277-882-255-28 abortion pills for sale in Harare
%in Harare+277-882-255-28 abortion pills for sale in Harare%in Harare+277-882-255-28 abortion pills for sale in Harare
%in Harare+277-882-255-28 abortion pills for sale in Harare
 

Lecture03 ie321 dr_atifshahzad