Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

The purpose of this project is to design a sequential digital circuit that receives three 4- bit 2's complement signed numbers and sort them in

image text in transcribed

The purpose of this project is to design a sequential digital circuit that receives three 4- bit 2's complement signed numbers and sort them in ascending or descending order. Clearly, this requires the circuit to determine the maximum, minimum, and middle number. The block diagram of the Sorter circuit is shown in Figure 1. Notice that the three input numbers and the three ordered output numbers are registered using D-type flip-flops. Moreover, 7-segment displays are used to show the registered inputs and outputs. Finish Cik Start CIK A-Display Rega Sorting Combinational Logic Input A Switches Reg Top D 4-bit Q Max or Min (4 bits) Top-Display (4 bits) D 4-bit Q R Reset B-Display RegB Input B Switches RegMid D 4-bit Mid (4 bits) Mid-Display (4 bits) D 4-bit Q R RegC C-Display Input Switches D 4-bit RegBottom Q (4 bits) Max or Min (4 bits) D 4-bit Q A R Mode Bottom-Display Mode Switch Figure 1: Number Sorter with Registered Inputs and Outputs The Sorter circuit has three 4-bit inputs (ie. A (A3A2A1A), B (B3B2B1B), and C (C3C2C1Co)) and three 4-bit outputs (i.e. Max (M3M2M Mo), Mid (D3D2D.D.), and Min (N3N2N.N.)). Each one of the inputs is registered using a 4-bit register. For example, input A is registered using the 4-bit register: RegA. Similarly, RegB and RegC are used to register inputs B and C respectively. The input registers operation is controlled by the Reset, Clk, and Start signals. The Reset signal is asynchronous active high signal; hence, when the Reset signal is active all input registers are set to 0000. When Reset is not active, the input registers values are updated at the positive edge of the Clk signal according to the values of input switches provided that Start signal is set to 1. When Reset is not active and Start is set to 0, the input registers retain (i.e. hold) their current values. After the Sorter module finishes execution, the three 4-bit outputs Max, Mid, and Min will be registered in three 4-bit registers (i.e. RegTop, RegMid, and RegBottom) at the positive edge of the Clk signal provided that the Finish signal is set to 1 and the Reset signal is not active. As long as the Reset signal is active, all output registers are set to 0000. When Reset is not active and Finish signal is set to 0, the output registers will hold their values at the positive edge of the clock. When the sorting order is ascending, RegTop should store the value of output Max while RegBottom stores the value of output Min. On the other hand, when the sorting order is descending, RegTop should store the value of output Min while RegBottom stores the value of output Max. The sorting order is determined by input Mode. When Mode is set to O, the sorting order is ascending. On the other hand, when Mode is set to 1, the sorting order is descending. The values of inputs registers (ie. Rega, RegB, and RegC) are displayed on three 7- segment displays as shown in Figure 1 (i.e. A-Display, B-Display, and C-Display). Similarly, three 7-segment displays (i.e. Top-Display, Mid-Display, and Bottom-Display) are used to display the values of the output registers. Notice that the 7-segment displays of the input registers should display dashes - as long as the Start signal is 0. Similarly, the 7-segment displays of the output registers should display dashes as long as the Finish signal is 0. The minus sign of negative numbers is represented by turning on the decimal point (dp) of the 7-segment display. For example, the number 1001 (i.e.-7) is displayed on the 7-segment display as follows: For positive numbers, the decimal point must be turned off. For example, the number 0111 is displayed on the 7-segment display as follows

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Intelligent Information And Database Systems Asian Conference Aciids 2012 Kaohsiung Taiwan March 2012 Proceedings Part 2 Lnai 7197

Authors: Jeng-Shyang Pan ,Shyi-Ming Chen ,Ngoc-Thanh Nguyen

2012th Edition

3642284892, 978-3642284892

More Books

Students also viewed these Databases questions

Question

Does it have at least one-inch margins?

Answered: 1 week ago

Question

Does it highlight your accomplishments rather than your duties?

Answered: 1 week ago