

For a 2-input gate, the truth table is Inputs Output A

The NAND gate produces a LOW output when all inputs are HIGH otherwise, the output is HIGH. (Bit positions are numbered from right to left starting with 0.) What will be the result if you OR an ASCII letter with the 8-bit mask 00100000? The resulting letter will be lower case. ASCII letters have a 1 in the bit 5 position for lower case letters and a 0 in this position for capitals. Floyd, Digital Fundamentals, 10th edĪ B X The OR operation can be used in computer programming to set certain bits of a binary number to 1. Thus, the OR operation is written as X = A + B. The OR operation is shown with a plus sign (+) between the variables. The OR gate produces a HIGH output if any input is HIGH if all inputs are LOW, the output is LOW. If the binary number 10100011 is ANDed with the mask 00001111, what is the result? 00000011 Floyd, Digital Fundamentals, 10th ed If you want to retain certain bits of a binary number but reset the other bits to 0, you could set a mask with 1’s in the position of the retained bits. Floyd, Digital Fundamentals, 10th edĪ B X The AND operation is used in computer programming as a selective mask. Thus, the AND operation is written as X = A. The AND operation is usually shown with a dot between the variables but it may be implied (no dot). The AND gate produces a HIGH output when all inputs are HIGH otherwise, the output is LOW. All Rights ReservedĪ X A group of inverters can be used to form the 1’s complement of a binary number: Binary number © 2009 Pearson Education, Upper Saddle River, NJ 07458. Thus, the Boolean expression for an inverter is X = A. The NOT operation (complement) is shown with an overbar. When the input is LOW, the output is HIGH when the input is HIGH, the output is LOW. The inverter performs the Boolean NOT operation. 2008 Pearson Education © 2009 Pearson Education,©Upper Saddle River, NJ 07458.
