Combinational circuit for sorting the string, Computer Engineering

Assignment Help:

Every input line of combinational circuit represents a specific element of the string let's say xi and every output line results in the form of a sorted list. In order to get the above mentioned task a comparator is used for the processing.  

Every comparator has two input lines suppose a and b, and likewise two output lines say c and d. Every comparator offers two outputs it implies that c provides maximum of a and b (max (a, b)) and d offers minimum of a and b (min (a, b)) in comparator InC and DeC it is opposite as displayed in Figures. 

In broad there are 2 types of comparators generally known as increasing comparators and decreasing comparators signified by + BM(n) and - BM(n) where n signifies the number of input lines and output lines of the comparator. The depth of + BM (n) and - BM (n) is log n. These comparators are used for constructing the circuit of sorting.

1905_COMBINATIONAL CIRCUIT FOR SORTING THE STRING.png

Figure: Increasing Comparator, for 2 inputs

1439_COMBINATIONAL CIRCUIT FOR SORTING THE STRING1.png

Figure: Decreasing Comparator, for 2 inputs

280_COMBINATIONAL CIRCUIT FOR SORTING THE STRING2.png

Figure: Increasing Comparator, for n inputs

772_COMBINATIONAL CIRCUIT FOR SORTING THE STRING3.png

Figure: Decreasing Comparator, for n inputs

Now let's suppose a famous sequence called bitonic sequence and sort out the elements employing a combinational circuit comprising a set of comparators. The property of bitonic sequence is in this manner: 

Consider a sequence X= x0, x1, x2, x3, x4 ......xn-1 such that state/condition 1: either x0, x1, x2, x3, x4 .......... xi is a monotonically increasing sequence and xi+1, xi+2,  ................ xn-1  is a monotonically decreasing sequence or state 2: there exists a cyclic shift of sequence  x0, x1, x2, x3, x4 ................... xn-1 such that resulting sequence satisfies the state 1.

Let's take a few illustrations of bitonic sequence: 

B1= 4,7,8,9,11,6,3,2,1 is bitonic sequence

B2= 12,15,17,18,19,11,8,7,6,4,5 is bitonic sequence

In order to give a solution to such a bitonic sequence different stages of comparators are needed. The fundamental approach followed for solving such a problem is as given:

Let's say we have a bitonic sequence X= x0, x1, x2, x3, x4 .......... xn-1 with the property that first n/2 elements are monotonically increasing elements are monotonically increasing such that x0< x1< x2< x3< x4...n/2-1 and other numbers are monotonically decreasing like xn/2> xn/2+1> ...>xn-1. Afterwards these patterns are weighed against with the help of a comparator in this manner:

 Y= min(x0, xn/2), min(x1, xn/2+1), min(x2, xn/2+2), ...........Min (xn/2-1, xn-1)

 Z= max(x0, xn/2), max (x1, xn/2+1), max (x2, xn/2+2), ........Max (xn/2-1, xn-1

After the above considered iteration, the two new bitonic sequences are generated and the method is known as bitonic split. Thenafter a recursive operation on these two bitonic sequences is processed until we are able to achieve the sorted list of elements. The accurate algorithm for sorting the bitonic sequence is as follows:

Sort_Bitonic (X)

// Input: N Numbers following the bitonic property

// Output: Sorted List of numbers

1) The Sequence which means that X is transmitted on the input lines of combinational circuit that consists of different set of comparators.

2) The sequence X is divided into two sub-bitonic sequences let's say Y and Z with the help of a process called bitonic split.

3) Recursively executes the bitonic divide on sub sequences which means that Y and Z till the size of subsequence reach to a level of 1.

4) The sorted sequence is attained after this phase on the output lines.


Related Discussions:- Combinational circuit for sorting the string

Example on hamming error correcting code, Q. Example on hamming error corre...

Q. Example on hamming error correcting code? For illustration a 4-bit matching word can stand for 2 4 =16 values that range from 0 to 15 as: 0000, 0001, 0010, 0011, 0100, 01

Variable or compound expression - unification algorithm, Variable or compou...

Variable or compound expression - Unification algorithm: Here some things to note regarding this method are:  (i) There if really trying to match a constant to a different

Write c program to read the text book number, With a C program to read the ...

With a C program to read the text book number, title, author and publisher into a structure and print these values. # include # include void main() { struct boo

What is linked list, Q. What is Linked List? A linked list is a data st...

Q. What is Linked List? A linked list is a data structure formed by zero or more nodes linked by pointers. Every node has two parts as shown in Figure below. One of them is inf

Explain erasable programmable rom (eprom) - computer memory, Explain Erasab...

Explain Erasable Programmable ROM (EPROM) - Computer Memory? An EPROM is a ROM that can be reprogrammed and erased. A little glass window is installed at the top of the ROM pac

Why spc is used, SPC is used for (A)  Carrying Exchange Control Functi...

SPC is used for (A)  Carrying Exchange Control Functions (B)  Carrying Subscriber Control Functions (C)  Exchange Hardware (D)  Signalling Purpose Ans:

War (write after read) - data hazards , WAR (write after read) - Data hazar...

WAR (write after read) - Data hazards in computer architecture: WAR (write after read) - j tries to write at destination before it is read by i , hence i  wrongly gets the n

What can be middle wares role within e-commerce, What can be middle wares r...

What can be middle wares role within e-commerce? By the utilize info Platform Commerce Server a shopping service can take benefit of reaching the end user onto Open TV, SMS, WA

Explain the term- cycle based simulator, Explain the term- Cycle Based Simu...

Explain the term- Cycle Based Simulator This is a Digital Logic Simulation method which eliminates unnecessary calculations to achieve huge performance gains in verifying Bool

Write Your Message!

Captcha
Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd