Department of Computing and Information Science Digital Systems (CIS*3120) Code Converters The conversion from one binary code to another is common in digital systems. In this exercise, you will design and construct two combinational-circuit converters. Grey Code to Binary Your first task is to design a combinational circuit with four inputs and four outputs that converts a four-bit Grey code number (see Table 1) into the equivalent four-bit binary number. Implement the circuit with exclusive-OR gates. Connect the circuit to four binary switches and to four binary probes and verify that the circuit is working correctly. Make sure to show your truth table, Simplified Boolean functions, and correctly implemented circuit to the Teaching Assistant. Binary Grey Code 0000 0000 0001 0001 0010 0011 0011 0010 0100 0110 0101 0111 0110 0101 0111 0100 1000 1100 1001 1101 1010 1111 1011 1110 1100 1010 1101 1011 1110 1001 1111 1000 Table 1: 4-bit Grey code 1 Seven-Segment Display A seven-segment display is used for displaying any one of the decimal digits 0 through 9. Usually, the decimal digit is available in BCD. A BCD-to-seven-segment decoder accepts a decimal digit in BCD and generates the corresponding seven-segment code. For example, for an input of 616 the output 01101102 (the ASCII code for the character ‘6’) would be produced. Figure 1 shows the connections necessary between the decoder and the display. 0 1 2 3 4 5 6 7 8 9AB CDEF 7 Your Circuit A ASCIIDisplay Hex Keyboard 0 Figure 1: Block diagram of circuit. Your task is to construct the circuit shown in Fig. 1. As each hexadecimal digit corresponds to four binary digits, your circuit will have four inputs. ASCII is a 7-bit code, therefore your circuit will require 7 outputs. The input to your circuit should be provided using a hex-keyboard, which can be found in the primio.clf library. Use an ASCIIdisplay, which can be found in the same library, to display the ASCII code (character) output by your circuit. (Note: When using the ASCII-display, make sure to ground the input to pin number 7 (which is actually the eighth input counting from one). You can do this using a switch permanently set to zero. Although ASCII is a 7-bit code, an extra (eighth) bit is sometimes used to represent an additional 128 characters (not part of the English language) whenever the eighth bit is 1. ) Procedure: Follow the five steps below. 1. Use the ASCII table at the bottom of this page to create a truth table for the problem. 2. Employ a K-map to find a simplified Boolean expression for each output of the table. (You will need to show these maps to the TA when being marked.) 2 3. Using the simplified expressions, implement your circuit in LogicWorks’ design window. 4. Use LogicWorks’ DevEditor to create a symbol for your circuit. (See lab #1 if you don’t remember how to do this.) 5. Connect the hex-keyboard and ASCII-display to the input and output of your circuit and verify that it is working correctly. Make sure to show your truth table, Simplified Boolean functions, and correctly implemented circuit to the Teaching Assistant. Table2: American Standard Code for Information Interchange (ASCII) Bits 4321 0000 0001 0010 0011 0100 0101 0110 0111 1000 1001 1010 1011 1100 1101 1110 1111 000 NUL S0H STX ETX EOT ENQ ACK BEL BS HT LF VT FF CR SO SI 001 DLE DC1 DC2 DC3 DC4 NAK SYN ETB CAN EM SUB ESC FS GS RS US 010 SPACE ! “ # $ % & ‘ ( ) * + ‘ . / Bit Positions 765 011 100 0 @ 1 A 2 B 3 C 4 D 5 E 6 F 7 G 8 H 9 I : J ; K < L = M > N ? O 101 P Q R S T U V W X Y Z [ \ ] ^ _ 110 ` a b c d e f g h i j k l m n o 111 p q r s t u v w x y z { | } ~ DEL 3