Logic, Boolean algebra, logic gates, logic circuits...
...it's all the same, but if you know your logic, you can program just about anything you can dream of (almost).
Try logic gates on your own and see how they work. Further down the page, I've created assignments in different levels of complexity for you to get to learn the gates.
Input | Output |
---|---|
0 | 0 |
1 | 1 |
Logic tasks can be solved using the browser software Logic.ly (https://logic.ly/demo/), which can simulate the logic.
You have been asked to program traffic lights at an intersection.
You need to program two traffic lights so that when one light turns green, the other will always be red, and vice versa.
A customer wants a smart system for their garage.
The customer has license plate recognition installed at the driveway entrance, which opens the garage door when they drive onto the property.
The customer also wants a button inside the garage to open the door from the inside when they need to leave for work.
You need to program a solution that opens the garage door whenever either the button inside the garage or the license plate recognition is activated.
Your customer wants a simple alarm system for their home, with the ability to disable the alarm.
The home has six windows, each equipped with a glass break detector, and one door with a door contact.
If any of the glass break detectors is triggered, an alarm should sound.
If the door contact is triggered, an alarm should also sound unless the alarm is disarmed using a code or a button.
A company has a parking garage where they issue two types of access cards: guest cards and employee cards.
The company wants a system to open the gate for both their guests and employees.
However, certain criteria must be met:
Employees always have access to the parking garage, including on weekends, holidays, and outside of working hours.
Guests have access to the parking garage only on weekdays, during working hours.
The customer wants to increase energy savings and daily comfort.
They want to automate their outdoor lighting and have a garden gate that remains unlocked since they receive many deliveries at all hours.
You need to create a solution for the customer based on the following criteria:
Outdoor lights should turn on automatically at dusk.
Outdoor lights should turn off automatically after midnight.
Outdoor lights should turn on if it’s dark and the garden gate is opened.
Outdoor lights should not turn on if it’s daylight, even when the garden gate is opened.
Your customer has a large building with fire alarm (ABA), intrusion alarm (AIA), and KNX installations, all integrated into a single Building Management System (BMS) based on the Niagara platform.
The customer wants the building automation programmed according to the following criteria:
In case of fire, all doors and grilles in the building should open completely to allow maximum evacuation and give the fire department access to the building.
In case of an alarm, such as a break-in, the building should go into lockdown—meaning all doors and grilles should lock to make it harder for intruders to exit.
The fire department should be notified in the event of a fire.
G4S should be alerted in the event of a break-in.
In case of a false alarm on either the fire (ABA) or intrusion (AIA) system, a technician should be called.
Your customer is a large hotel that hosts conferences and large gatherings. The hotel has a large hall with three lighting zones, each controlled by its own switch in a three-way configuration.
The hotel recently installed two new folding walls, allowing the large hall to be divided into three separate rooms. They now want an automated system that also splits the lighting controls, so each switch controls its respective lighting zone.
Additionally, the system should allow for flexibility in configurations, so that the space can also be divided with a single folding wall, creating one large room and one smaller room as needed. This would involve adjusting the lighting control accordingly to match the chosen layout.
A family wants to automate the control of their smart home. They have various devices, including lights, a thermostat, and security cameras, which they would like to integrate. The task is to develop a logic circuit that controls the following functions:
When no one is home:
All lights should turn off.
The thermostat should turn off.
Security cameras should activate.
When at least one person is home:
The lights should turn on.
The thermostat should adjust according to preset preferences.
Security cameras should turn off.
If a break-in alarm is triggered:
All lights should turn on.
The thermostat should turn off.
Security cameras should activate.
This setup should provide both energy efficiency and security based on occupancy and security conditions.
A laboratory wants to implement an access control mechanism for their facilities.
They have three access levels: regular employees, managers, and technicians.
Each employee has an access card. The task is to develop a logic circuit that controls access to the laboratory based on the following requirements:
Regular employees have access to the laboratory during their working hours (from 07:00 to 16:00).
Managers have access to the laboratory on weekdays, at any time of the day (but not on weekends or holidays).
Technicians always have access to the laboratory (24/7/365).
If a person without an access card attempts to enter the laboratory, an alarm should be triggered.
This system will ensure that each person only has access during their designated time slots and prevent unauthorized access.
A office building wants to optimize energy consumption by implementing intelligent lighting control. The task is to develop a logic circuit that controls the lighting in office spaces based on the following requirements:
When no one is present in the office:
The lights should automatically turn off to save energy.
If motion is detected in the office:
The lights should automatically turn on when movement is sensed, ensuring illumination when needed.
If there is enough natural daylight to maintain the desired lighting level:
The lights should turn off, regardless of motion detection, to avoid unnecessary energy consumption.
Lights should automatically turn on/off based on office building working hours:
The lights should be scheduled to turn on before the workday begins and off after working hours, ensuring the office is lit only during the workday.
This system will combine occupancy sensing with natural light detection and time scheduling to reduce energy waste while maintaining proper lighting when needed.