1.2 Logical Operations Flashcards
Draw truth tables for AND, OR, NOT, XOR, NAND and NOR
Draw truth tables for logical expressions (e.g. A AND B (B NOR C))
Explain the purpose of masking, the logical operation and design the mask required for a given situation
The purpose of masking is to identify the value of a bit
e.g. to find out the value of the leftmost bit in 10001100
i would AND it by 10000000
if the output for the leftmost bit is 1, the value is 1
Explain how XOR could be used to encrypt and decrypt data using an encryption/decryption key
XOR is used to create an encrypted value with a key and an original value
original: 10000000
Key: 10000000 XOR
—————————-
Encrypted value: 00000000
the data can only be decrypted by people who have access to the key
encrypted value: 00000000
Key: 10000000 XOR
—————————————
Original: 10000000
solve boolean identities using e.g. de morgans law etc.
how do you clear the contents of a register
you AND the register with 00000000