Continue to Site

Welcome to our site!

Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

  • Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

Detecting Ascending/Descending 4-bit numbers!

Status
Not open for further replies.

VeloceT

New Member
Hello,

I need to build a device that accepts a 4-bit number and deciphers whether it's ascending, or descending (or both, such as 0000 or 1111.) The device has two outputs. The first gives 1 if and only if the number is ascending (each bit is greater than or equal to the bit to its left.), the other when it is descending.
For example:

0000
0001
0011
0111
1111

are all examples for ascending numbers, whereas;

0000
1000
1100
1110
1111

are all descending. The rest are neither one.

The design needs to include minimum number of logic gates!
gates allowed (AND,OR,NAND,NOR,XOR).

I have managed to create it using 12 gates. Can anyone come up with less?


I would really be glad for help!
 
VeloceT,

Is the complement of the variable available, or does it need a gate to realize it? Ratch
 
Status
Not open for further replies.

New Articles From Microcontroller Tips

Back
Top