360 likes | 392 Views
Practice numerical problems on digital systems, number systems, logic gates, Boolean expressions, and more to enhance understanding of digital logic design concepts.
E N D
Practice Problems Digital Logic Design 17 Mechatronics
Problems Content • Introduction of Digital System • Number Systems • Binary Coded Systems • Basic Logic Gates • Boolean Expression • Truth Table Construction • Implementation of Logic Circuits • Reduction of Logic Expression • Application based Logic Circuits
Introduction of DLD • Which of the following involve analog quantities and which involve digital quantities? (a) Ten-position switch (b) Current flowing from an electrical outlet (c) Temperature of a room (d) Sand grains on the beach (e) Automobile fuel gauge
NUMBERS SYSTEM • What is the maximum number that we can count up to using 10 bits? • How many bits are needed to count up to a maximum of 511? • Draw the timing diagram for a digital signal that continuously alternates between 0.2 V (binary 0) for 2 ms and 4.4 V (binary 1) for 4 ms.
NUMBERS SYSTEM Suppose that the decimal integer values from 0 to 15 are to be transmitted in binary. (a) How many lines will be needed if parallel representation is used? (b) How many will be needed if serial representation is used?
NUMBERS SYSTEM CONVERSION • Convert 24CE16 to decimal. • Convert 311710 to hex, then from hex to binary • Convert 10010111101101012 to hex. • Write the next four numbers in this hex counting sequence: E9A, E9B, E9C, E9D. • Convert 3527 to binary16. • What range of decimal values can be represented by a four-digit hex number?
BINARY DATA REPRESENTATION • How many bytes are in a 32-bit string (a string of 32 bits)? • What is the largest decimal value that can be represented in binary using two bytes? • How many bytes are needed to represent the decimal value 846,569 in BCD?
BINARY DATA REPRESENTATION 1. Encode the following message in ASCII code using the hex representation: “COST $72.” 2. The following padded ASCII-coded message is stored in successive memory locations in a computer: What is the message? 3. Attach an odd-parity bit to the ASCII code for the $ symbol, and express the result in hexadecimal. 4. Attach an even-parity bit to the BCD code for decimal 69. 5. Why can’t the parity method detect a double error in transmitted data?
BINARY DATA REPRESENTATION • A typical CD-ROM can store 650 megabytes of digital data. Since mega 220, how many bits of data can a CD-ROM hold?
In order to program many microcontrollers, the binary instructions are stored in a file on a personal computer in a special way known as Intel Hex Format. The hexadecimal information is encoded into ASCII characters so it can be displayed easily on the PC screen, printed, and easily transmitted one character at a time over a standard PC’s serial COM port. One line of an Intel Hex Format file is shown below: 10002000F7CFFFCF1FEF2FEF2A95F1F71A95D9F7EA The first character sent is the ASCII code for a colon, followed by a 1. Each has an even parity bit appended as the most significant bit. A test instrument captures the binary bit pattern as it goes across the cable to the microcontroller.
What should the binary bit pattern (including parity) look like? (MSB – LSB) • The value 10, following the colon, represents the total hexadecimal number of bytes that are to be loaded into the micro’s memory. What is the decimal number of bytes being loaded? • The number 0020 is a four-digit hex value representing the address where the first byte is to be stored. What is the biggest address possible? How many bits would it take to represent this address? • The value of the first data byte is F7. What is the value (in binary) of the least significant nibble of this byte? FFFF 1111 1111 1111 1111 16 bits
BINARY DATA REPRESENTATION A small process-control computer uses hexadecimal codes to represent its 16-bit memory addresses. (a) How many hex digits are required? (b) What is the range of addresses in hex? (c) How many memory locations are there?
BINARY DATA REPRESENTATION Numbers are entered into a microcontroller-based system in BCD, but stored in straight binary. As a programmer, you must decide whether you need a one-byte or two-byte storage location. (a) How many bytes do you need if the system takes a two-digit decimal entry? (b) What if you needed to be able to enter three digits?
BINARY DATA REPRESENTATION *In a microcomputer, the addresses of memory locations are binary numbers that identify each memory circuit where a byte is stored. The number of bits that make up an address depends on how many memory locations there are. Since the number of bits can be very large, the addresses are often specified in hex instead of binary. (a) If a microcomputer uses a 20-bit address, how many different memory locations are there? (b) How many hex digits are needed to represent the address of a memory location? (c) What is the hex address of the 256th memory location? (Note: The first address is always 0.)
LOGICS…? • If chimney is not blocked and the house is cold and the pilot light is lit, then open the main fuel valve to start boiler. b = chimney blocked c = house is cold p = pilot light lit v = open fuel valve – So in terms of a logical (Boolean) expression v = (NOT b) AND c AND p
LOGICS…? • Which word does NOT belong with the others? • Inch B. Foot C. Gram D. Meter • Look at this series: 2, 1, (1/2), (1/4), ... What number should come next? • If book then it has ________ ? • Fiction Story • Pictures • Pages • Learning
LOGICS…? • Design a logic circuit whose output is HIGH only when a majority of inputs A, B, and C are LOW
EXAMPLE OF DIGITAL SYSTEM In many industrial control systems, it is required to activate an output function whenever any one of several inputs is activated. For example, in a chemical process it may be desired that an alarm be activated whenever the process temperature exceeds a maximum value or whenever the pressure goes above a certain limit. Figure 3-4 is a block diagram of this situation.The temperature transducer circuit produces an output voltage proportional to the process temperature. This voltage, VT, is compared with a temperature reference voltage, VTR, in a voltage comparator circuit. The comparator output, TH, is normally a low voltage (logic 0), but it switches to a high voltage (logic 1) when VT exceeds VTR, indicating that the process temperature is too high. A similar arrangement is used for the pressure measurement, so that its associated comparator output, PH, goes from LOW to HIGH when the pressure is too high.
BOOLEAN EQUATION IMPLEMENTATION Draw the circuit diagram to implement the following expressions • x = (A + B)(B’ + C) • x = ABC(A + D) • z = (A + B + C’DE’)’ + B’CD’
Simplify the logic circuit and Boolean equation z = A’C(A’BD)’ + A’BC’D’ + AB’C. x = (A’ + B)(A + B + D)D.’ y = (C + D)’ + A’CD’ + AB’ C’ + A’ B’CD + ACD’
APPLICATION PROBLEMS • Refer to Figure 4-8(a), where an analog-to-digital converter is monitoring the dc voltage of a 12-V storage battery on an orbiting spaceship. The converter’s output is a four-bit binary number, ABCD, corresponding to the battery voltage in steps of 1 V, with A as the MSB. The converter’s binary outputs are fed to a logic circuit that is to produce a HIGH output as long as the binary value is greater than 01102 610; that is, the battery voltage is greater than 6 V. Design this logic circuit.
APPLICATION PROBLEMS • The notation x1, x0 represents a two-bit binary number that can have any value (00, 01, 10, or 11); for example, when x1=1 and x0= 0, the binary number is 10, and so on. Similarly, y1y0 represents another two-bit binary number. Design a logic circuit, using x1, x0, y1, and y0 inputs, whose output will be HIGH only when the two binary numbers x1x0 and y1y0 are equal.
APPLICATION PROBLEMS A manufacturing plant needs to have a horn sound to signal quitting time. The horn should be activated when either of the following conditions is met: 1. It’s after 5 o’clock and all machines are shut down. 2. It’s Friday, the production run for the day is complete, and all machines are shut down. Design a logic circuit that will control the horn. (Hint: Use four logic input variables to represent the various conditions; for example, input A will be HIGH only when the time of day is 5 o’clock or later.)
APPLICATION PROBLEMS • Four large tanks at a chemical plant contain different liquids being heated. Liquid-level sensors are being used to detect whenever the level in tank A or tank B rises above a predetermined level. Temperature sensors in tanks C and D detect when the temperature in either of these tanks drops below a prescribed temperature limit. Assume that the liquid-level sensor outputs A and B are LOW when the level is satisfactory and HIGH when the level is too high. Also, the temperature-sensor outputs C and D are LOW when the temperature is satisfactory and HIGH when the temperature is too low. Design a logic circuit that will detect whenever the level in tank A or tank B is too high at the same time that the temperature in either tank C or tank D is too low.