Assignment 1
Number Representations and a 7 Segment Decoder
Due date: Jan 29, 2021
Submission Instructions
Submit two files and two files only. Do not use a zip file (or any other type of archive). Your written answers should be in a PDF file and should have your name and student number clearly indicated at the top of the document. Your circuit should have the name SevenSegDec.circ and should have your name and student number clearly indicated at the top of the document. If you write your answers by hand (probably easiest), scan your work with one of the McGill photocopiers (it will send you a pdf of the scanned document directly to your e-mail). Scanned work must be legible! Use a dark pen or pencil when preparing your work such that your scanned work has good contrast and is easy to read. All work must be your own, and must be submitted using MyCourses. Double check that you have correctly submitted your assignment as you will NOT receive marks for work incorrectly submitted.
1 Number Representation
Show your work in writing up answers to the following questions to get full credit.
1. Convert positional notation 0.1101012 from binary to decimal using any appropriate algorithm that was seen in class.
2. Convert positional notation 8.62510 from decimal to binary and hexadecimal using algorithms that were seen in class.
3. Convert positional notation 2TD.O3F32 from base 32 to binary and then to hexadecimal. Here, much like base 16, we use letters A through V to represent 10 through 31, and note the first digit after the radix point is O (not zero).
4. Convert the base 7 number 2123366147 to hexadecimal.
5. Represent the base 10 number 25906210 as a 20 bit signed binary number using twos comple-
ment format. Convert the binary bit pattern in your answer to hexadecimal using 5 symbols.
6. Represent the decimal number 4.62510 as an IEEE single precision floating point number. Give your answer in both binary and hexadecimal and show your work. Is the representation exact?
1
2 Seven Segment Decoder
A seven segment decoder is typically used to determine which light emit- ting diodes in a seven segment display should illuminate to display a digit specified in binary coded decimal.
Logisim-evolution includes such a seven segment display that you will use in this question. The decoder takes four binary bits as the input, which we label in order from most significant bit to least significant bit, A3 A2 A1 A0. The decoder produces as output a pattern of 7 bits, S6 S5 S4 S3 S2 S1 S0, which specifies which segments should illuminate. The figure on the right shows the relationship between the pins and the corresponding segments of the display. Note that there is an 8th pin, S7, which controls the decimal point and that we will not use in this assignment.
In this question, Instead of decoding BCD, your decoder should produce
your McGill ID for binary bit patterns 0 through 8. (For example, if the
input is 0, display the first digit of your ID. If the input is 1, diplay the
second digit of your ID.) You can produce any output (i.e., we dont care)
for inputs of binary bit patterns 9 through 15. If your McGill ID is 0123456789, your decoder should produce exactly the patterns shown below.
1. Write out a truth table for your circuit and include this with your written answers.
2. Implement the 7 boolean functions in the provided logisim circuit file using only AND, OR and NOT gates provided in the built in library (it is also OK to use NAND and NOR gates, and to negate inputs on gates). You may use any solution you wish, but you may find it easiest to use a sum of products approach, much like a PLA.
Create your solution in the provided circuit file, as it already has a set of inputs and outputs defined. These input and output pins should not be moved so as to prevent the sub-circuit appearance from changing (right-most tool bar button in logisim) as this is important for testing. Be sure to add your name and student number in your circuit.
Reviews
There are no reviews yet.