I'm stuck on part A of a decoder.

WBahn

Joined Mar 31, 2012
33,171
37 AND = 10 pkg
11 OR = 3 pkg
6 INV = 1 pkg
54 gates, 14 packages total

If I didn't make a mistake, that would make it a tie.
Does that mean that you were able to share some intermediate signals?

In any event, it sounds like the gate/package counts are comparable. I don't know which solution would be the most "elegant". It would probably depend on the viewpoint being taken and what is important.

Yours has the nice feature that it works directly off the definition of the problem. Oh, does it take into account that wrap around is not allowed so that 0 and 7 are not considered adjacent? I assume so since your test bed should check all 64 possible input combinations, so if it didn't I imagine you would have caught it.

Mine has the advantage of being easily scaled. You could easily make a PCB that handles some small number of inputs, say two bits or three bits for each gear value, and then stack an arbitrary number of them together. It would require a slight modification to support the next higher bit and to glue the adjacent gears that cross the PCB boundary together.

That might make an interesting assignment (perhaps extra credit).
 

dl324

Joined Mar 30, 2015
18,460
Oh, does it take into account that wrap around is not allowed so that 0 and 7 are not considered adjacent? I assume so since your test bed should check all 64 possible input combinations, so if it didn't I imagine you would have caught it.
I didn't see any notation that 0 and 7 weren't to be treated as adjacent, I considered 0 and 7 adjacent. Even when I implemented using the encoders and selector, I wired that way.

I'll have to check my Kmap to see what affect that has on the logic.

For more than 6 variables, I wouldn't bother with Kmaps. I stop at 6.
 

dl324

Joined Mar 30, 2015
18,460
Oh, does it take into account that wrap around is not allowed so that 0 and 7 are not considered adjacent?
That would remove 2 6 variable minterms, so the gate count goes down by 5 AND and 2 OR. Down to 12 packages.
upload_2018-5-17_22-42-48.png

The nice thing about 6 variables is that I can read the gear settings directly from the map:
upload_2018-5-17_22-48-6.png
 
Last edited:

WBahn

Joined Mar 31, 2012
33,171
I didn't see any notation that 0 and 7 weren't to be treated as adjacent, I considered 0 and 7 adjacent. Even when I implemented using the encoders and selector, I wired that way.

I'll have to check my Kmap to see what affect that has on the logic.

For more than 6 variables, I wouldn't bother with Kmaps. I stop at 6.
The problem is about a car's gearbox and this is a circuit that is checking whether the gear that the driver is requesting is either the current gear or adjacent to it. Thus it would be unreasonable to consider 0 (low gear) and 7 (high gear) to be adjacent and allow the car to shift directly between them when it won't allow skipping even a single gear otherwise.
 

WBahn

Joined Mar 31, 2012
33,171
That would remove 2 6 variable minterms, so the gate count goes down by 5 AND and 2 OR. Down to 12 packages.
View attachment 152693

The nice thing about 6 variables is that I can read the gear settings directly from the map:
View attachment 152695
How much additional effort would it be if they were to come back to you and say that they want it for 16 gears? Would you be able to easily tweak things to support another bit (and another one after that), or would it be easier to start over?

I have no doubt that the gate count on yours will scale much better than mine. Mine should scale as n+log(n) whereas yours should scale as just log(n).
 

dl324

Joined Mar 30, 2015
18,460
The problem is about a car's gearbox and this is a circuit that is checking whether the gear that the driver is requesting is either the current gear or adjacent to it. Thus it would be unreasonable to consider 0 (low gear) and 7 (high gear) to be adjacent and allow the car to shift directly between them when it won't allow skipping even a single gear otherwise.
I've occasionally tried to shift from 5th to 1st, inadvertently, and the transmission lets me know pretty quickly that I got the wrong gear. I have a spring that doesn't work well until the transmission warms up, so I'm expecting more resistance...

I do 5th to 3rd a lot when I'm on the highway coming up on slow traffic.

But, a 1-5 shift would be unreasonable; but I don't take the mechanics of these types of problems very seriously.
 

WBahn

Joined Mar 31, 2012
33,171
I've occasionally tried to shift from 5th to 1st, inadvertently, and the transmission lets me know pretty quickly that I got the wrong gear. I have a spring that doesn't work well until the transmission warms up, so I'm expecting more resistance...

I do 5th to 3rd a lot when I'm on the highway coming up on slow traffic.

But, a 1-5 shift would be unreasonable; but I don't take the mechanics of these types of problems very seriously.
The mechanics aren't meant to be taken too seriously. They are usually idealized story problems from which the student is expected to extract reasonable circuit performance specifications. The other purpose they often serve is to give a useful framework for the student to work from. I would not be surprised if the 0-7 is a specific test case that the grader will be looking for.
 
Top