Assignment 1 For Exercises 1-5, match the following numbers with their definition A Number Natural number C Integer number D Negative number E Rational number 1 A unit of an abstract mathematical system subject to the laws of arithmetic 2 A natural number, a negative of a natural number, or zero 3 The number zero and any number obtained by repeatedly adding one to it 4 An integer or the quotient of two integers (division by zero excluded) 5 A value less than zero, with a sign opposite to its positive counterpart For Exercises 6-11, match the solution with the problem A 10001100 10011110 C 1101010 D 1100000 E 1010001 F 1111000 6 1110011 + 11001 (binary addition) 7 1010101 + 10101 (binary addition) 8 1111111 + 11111 (binary addition) 9 1111111 111 (binary subtraction) 10 1100111 111 (binary subtraction) 11 1010110 101 (binary subtraction) For Exercises 12-17, mark the answers true and false as follows: A True False 12 inary numbers are important in computing because a binary number can be converted into every other base 13 inary numbers can be read off in hexadecimal but not in octal 14 Starting from left to right, every grouping of four binary digits can be read as one hexadecimal digit 15 A byte is made up of six binary digits 16 Two hexadecimal digits can be stored in one byte 17 Reading octal digits off as binary produces the same result whether read from right to left as left to right Faculty of science Page 154
Exercises 18-45 are problems or short answer questions 18 Distinguish between a natural number and a negative number 19 Distinguish between a natural number and a rational number 20 Label the following numbers natural, negative, or rational A 1333333 1/3 C 1066 D 2/5 E 62 F (pi) 21 If 891 is a number in each of the following bases, how many 1s are there? A base 10 base 8 C base 12 D base 13 E base 16 22 Express 891 as a polynomial in each of the bases in Exercise 1 23 Convert the following numbers from the base shown to base 10 A 111 (base 2) 777 (base 8) C FEC (base 16) D 777 (base 16) E 111 (base 8) 24 Explain how base 2 and base 8 are related 25 Explain how base 8 and base 16 are related 28 Convert the following binary numbers to octal A 111110110 1000001 C 10000010 D 1100010 29 Convert the following binary numbers to hexadecimal A 10101001 11100111 C 01101110 D 01121111 30 Convert the following hexadecimal numbers to octal A A9 E7 C 6E 31 Convert the following octal numbers to hexadecimal A 777 Faculty of science Page 155
605 C 443 D 521 E 1 32 Convert the following decimal numbers to octal A 901 321 C 1492 D 1066 E 2001 33 Convert the following decimal numbers to binary A 45 69 C 1066 D 99 E 1 34 Convert the following decimal numbers to hexadecimal A 1066 1939 C 1 D 998 E 43 35 If you were going to represent numbers in base 18, what symbols might you use to represent the decimal numbers 10 through 17 other than letters? 37 Perform the following octal additions A 770 + 665 101 + 707 C 202 + 667 38 Perform the following hexadecimal additions A 19A6 + 43 AE9 + F C 1066 + ACD 39 Perform the following octal subtractions A 1066 776 1234 765 C 7766 5544 40 Perform the following hexadecimal subtractions A AC 111 9988 A C A9F8 1492 41 Why are binary numbers important in computing? 42 A byte contains how many bits? 43 How many bytes are there in a 64-bit machine? Faculty of science Page 156
44 Why do microprocessors such as pagers have only 8-bit machines? 45 Why is important to study how to manipulate fixed-sized numbers? Assignment (2) For Exercises 1-17, mark the answers true and false as follows: A True False 1 Logic diagrams and truth tables are equally powerful in expressing the processing of gates and circuits 2 oolean expressions are more powerful than logic diagrams in expressing the processing of gates and circuits 3 A NOT gate accepts two inputs 4 The output value of an AND gate when both inputs are 1 is 1 5 The AND and OR gates produce opposite results for the same input 6 The output value of an OR gate when both inputs are 1 is 1 7 The output of an OR gate when one input is 0 and one input is 1 is 0 8 The output value of an XOR gate is 0 unless both inputs are 1 9 The NOR gate produces the opposite results of the XOR gate 10 A gate can be designed to accept more than two inputs 11 A transistor is made of semiconductor material 12 Inverting the output of an AND gate is equivalent to inverting the individual signals first, then passing them through an OR gate 13 The sum of two binary digits (ignoring the carry) is expressed by an AND gate 14 A full adder takes the carry-in value into account 15 A multiplexer adds all of the bits on its input lines to produce its output 16 Integrated circuits are classified by the number of gates contained in them 17 A CPU is an integrated circuit For Exercises 18-29, match the gate with the diagram or description of the operation A AND NAND C XOR D OR E NOR F NOT 18 Inverts its input 19 Produces a 1 only if all its inputs are 1 and a 0 otherwise 20 Produces a 0 only if all its inputs are 0 and a 1 otherwise 21 Produces a 0 only of its inputs are the same and a 1 otherwise 22 Produces a 0 of all its inputs are all 1 and a 1 otherwise 23 Produces a 1 if all its inputs are 0 and a 0 otherwise 24 A X Faculty of science Page 157
25 A X 26 A X 27 A X 28 A X 29 A X Exercises 30-73 are short answer or design questions 30 How is voltage level used to distinguish between binary digits? 31 Distinguish between a gate and a circuit 32 What are the three notational methods for describing the behavior of gates and circuits? 33 Characterize the notations asked for in Exercise 32 34 How many input signals can a gate receive and output signals can a gate produce 35 Name six types of gates 36 Give the three representations of a NOT gate and say in words what NOT means 37 Give the three representations of an AND gate and say in words what AND means 38 39 40 41 42 43 44 45 Give the three representations of an OR gate and say in words what OR means Give the three representations of an XOR gate and say in words what XOR means Give the three representations of a NAND gate and say in words what NAND means Give the three representations of a NOR gate and say in words what NOR means Compare and contrast the AND gate and the NOR gate Draw and label the symbol for a three input AND gate, then show its behavior with a truth table Draw and label the symbol for a three-input OR gate, then show its behavior with a truth table What is used in a gate to establish how the input values map to the output value? Faculty of science Page 158
46 47 48 48 50 How does a transistor behave? Of what is a transistor made? What happens when an electric signal is grounded? What are the three terminals in a transistor and how do they operate? How many transistors does it take for each of these gates? a NOT b AND c NOR d OR e XOR 53 How can gates be combined into circuits? 54 What are the two general categories of circuits and how do they differ? 55 Draw a circuit diagram corresponding to the following oolean expression: (A + )( + C) 56 Draw a circuit diagram corresponding to the following oolean expression: (A + C)D 57 Draw a circuit diagram corresponding to the following oolean expression: A + (+C) 58 Draw a circuit diagram corresponding to the following oolean expression: (A) + (CD) 59 Show the behavior of the following circuit with a truth table: A 60 Show the behavior of the following circuit with a truth table: A 63 64 65 What is circuit equivalence? Name six properties of oolean algebra and explain what each means Differentiate between a half adder and a full adder Faculty of science Page 159
66 67 68 69 70 71 72 What is the oolean expression for a full adder? What is a multiplexer? a Circuits used for memory are what type of circuits? b How many digits does an S-R latch store? c The design for an S-R latch shown in Figure 412 guarantees what about the outputs X and Y? What is an integrated circuit or chip? Define the abbreviations SSI, MSI, LSI, and VLSI In the chip shown in Figure 413, what are the pins sued for? Draw a circuit using two full adders that adds two two-bit binary values Show its corresponding truth table A circuit using two full adders that adds two two-bit binary numbers of the form: A + C D ------- X Y Z 73 How can the XOR operation be expressed using other operators? Faculty of science Page 160
Analysis of Sequential Circuits Assignment (3) 1 Derive a) excitation equations, b) next state equations, c) a state/output table, and d) a state diagram for the circuit shown in Figure 11 Draw the timing diagram of the circuit 2 Derive a) excitation equations, b) next state equations, c) a state/output table, and d) a state diagram for the circuit shown in Figure 12 3 Derive a) excitation equations, b) next state equations, c) a state/output table, and d) a state diagram for the circuit shown in Figure 13 Faculty of science Page 161
4 Derive the state output and state diagran for the sequential circuit shown in Figure 14 5 A sequential circuit uses two D flip-flops as memory elements The behaviour of the circuit is described by the following equations: D1 = Q1 + x *Q2 D2 = x*q1 + x *Q2 Z = x *Q1*Q2 + x*q1 *Q2 Derive the state table and draw the state diagram of the circuit 6 Design a sequential circuit specified by Table 61, using JK flip-flops Table 61 7 Design the sequential circuit in question 6, using T flip-flops 8 Design a mod-5 counter which has the following binary sequence: 0, 1, 2, 3, 4 Use JK flip-flops 9 Design a counter that has the following repeated binary sequence: 0, 1, 2, 3, 4, 5, 6, 7 Faculty of science Page 162
Use RS flip-flops 10 Design a counter with the following binary sequence: 1, 2, 5, 7 and repeat Use JK flip-flops 11 Design a counter with the following repeated binary sequence: 0, 4, 2, 1, 6 Use T flip-flops 12 Design a counter that counts in the sequence 0, 1, 3, 6, 10, 15, using four a) D, b) SR, c) JK and d) T flip-flops 13 The content of a 5-bit shift register serial in parallel out with rotation capability is initially 11001 The register is shifted four times to the right What are the content and the output of the register after each shift? Faculty of science Page 163