Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

DIGITAL DESIGN + BOOLEAN LOGIC Consider a simple electronic device that turns on a lamp whenever there is motion in a dark room. Assume that

DIGITAL DESIGN + BOOLEAN LOGIC

Consider a simple electronic device that turns on a lamp whenever there is motion in a dark room. Assume that we have a motion detector that has one output MOTION that has the value 1 when motion is detected and the value 0 otherwise. Likewise assume that we have a light detector that has one output LIGHT that has the value 1 when light is detected in the room and the value 0 when the room is dark. Finally, assume that we have an electronically controlled light with one input LAMP that turns a light on when the input has the value 1 and turns the light off when the input has the value 0. The device that we wish to build is a detector that is capable of turning on the lamp whenever someone is moving in a dark room. Given the values of the MOTION and LIGHT sensors, the detector must control the LAMP. Thus MOTION and LIGHT are the detectors primary inputs and LAMP is the devices primary output.

If the detector system was implemented as a full microprocessor, it could be controlled by a computer program. Create a high-level pseudo-code for a program capable of performing the necessary tasks. Complete the following code segment:

while (1) {

get (motion, light);

lamp = // complete this line with a Boolean expression

}

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Database Concepts International Edition

Authors: David M. Kroenke

6th Edition International Edition

0133098222, 978-0133098228

More Books

Students also viewed these Databases questions

Question

how would you have done things differently?

Answered: 1 week ago

Question

What were the reasons for your conversion or resistance?

Answered: 1 week ago

Question

How was their resistance overcome?

Answered: 1 week ago