START A BIT > Knowledge Base > This page
Whereas fuzzy logic is an approach to computing based on 'degrees of truth,' modern computing is based on Boolean logic, which is based on the usual 'true or false' (1 or 0) dichotomy.
Boolean logic provides the foundation for computers and other modern digital electronics. Digital logic circuits are one particular application of Boolean logic that uses voltage values to represent true and false, or 1 and 0.
Answers to "Yes/No", "True/False", "OK/NOK" questions or judgements
(Does Dad ask me to eat?)
(Does Mum ask me to eat?)
(Do I eat?)
(Does she have long hair?)
(Does she have blue eyes?)
(Do I like her?)
(Does she like me?)
(Do you love me?)
(30 + 5 == 35) = True
(1 > 2) = False
(counter > 10)
(Digital_pin_read() == HIGH?)
((counter < 3) and not(game_over))
True/False variable
Logic Gate results
Comparison results
Check PJ007.G2: Wire game with Micro:bit, demo result for LP2402 for real use cases.
"OR False(0)" will keep as is
☹️ or ☹️ = ☹️
😃 or ☹️ = 😃
"OR True(1)" to force True(1)
☹️ or 😃 = 😃
😃 or 😃 = 😃
AND is as "Must...And Also..."
But not the general "...Together With..." or "...Also/Too..." meaning as in "ladies and gentlemen, may I have your attention...""AND False(0)" to force False(0)
☹️ and ☹️ = ☹️
😃 and ☹️ = ☹️
"AND True(1)" will keep as is
☹️ and 😃 = ☹️
😃 and 😃 = 😃
In Python, it's literally the same words as operations. Try out here
X = False
Y = False
Z = True
print((not(X) and Y) or Z)
Sort out the output value basing on the input
Draw a Truth Table for this logic setup
Build this logic setup in MakeCode blocks
Read the Python code for this logic judgement
What is F, when
X=0, Y=0, Z=1
X=1, Y=1, Z=1
X=0, Y=1, Z=0
What is Q, when
A=0, B=1
A=1, B=1
A=1, B=0
What is the output, when
A=1, B=0, C=1
A=0, B=0, C=1
A=0, B=1, C=1
What is y, when
X0=0, X1=0
X0=1, X1=0
X0=1, X1=1
What is Q, when
A=1, B=0, C=1
A=1, B=1, C=1
A=0, B=0, C=0
What is the final output, when
A=1, B=0, C=1
A=1, B=1, C=1
A=0, B=0, C=0
A good list from https://logic.ly/lessons/, with explanations and simulations.
https://logic.ly/demo/ - Learn logic gates via visualization and simulation. Very nice interface, fun and nice visualization. But need to buy for offline download, it's totally OK to use online version, just not possible to save project.
https://academo.org/demos/logic-gate-simulator/ - A simple logic gates simulator
https://academo.org/quizzes/logic-gates-quiz/ - 10 questions basic logic gates quiz
https://circuitverse.org/simulator - another logic gates simulator, seems professional, but not as easy and nice feeling as logic.ly. CircuitVerse simulator has possibility to save the project
https://www.onlinegdb.com/online_python_compiler - Online python interpreter, practice python codes directly