Computer Science

Hey guys I'm trying to get good at using gates without using basic gates (AND, OR, NOT).

I'm trying to make it so:

If any 3 switches are off then the Low/white light flashes,

If 4 turn off the yellow flashes.

5 and 6 falses are easy because I can use a XOR and NOR gate - basically saying if there is only one left or if all are false, invert.

what's an efficient way to do this?

Attached: clusterboy.png (1172x612, 81K)

Other urls found in this thread:

en.wikipedia.org/wiki/Karnaugh_map
en.wikipedia.org/wiki/NAND_logic#Making_other_gates_by_using_NAND_gates
twitter.com/SFWRedditGifs

Cmon its easy m8

write down the boolean algebra

The issue is I don't know how to do that, then it would be easy,

in really basic Boolean algebra I guess it would be something like:

ab+ac+ad+ae+af+bc+bd....

until you have every combination until it would literally mean any combo of two makes x = 1.

I thought it might be easier to make a series of gates which become true/false in certain conditions until I have a unique combinations of 1's and 0's which I can use to make x = 1.

1. make a table with the inputs on one side and the desired outputs on the outer side
2. figure out the gate(s) that produce the desired outputs.

en.wikipedia.org/wiki/Karnaugh_map

If you're willing to use NOR then you can use NAND as well. All basic gate functionality can be made using NAND+NAND or NOR+NOR.
Use this and en.wikipedia.org/wiki/NAND_logic#Making_other_gates_by_using_NAND_gates

Thanks I'll look into those two, this is the truth table i require by the way:

000000=0
000001=0
000011=0
000111=1
001111=0
011111=0
111111=0

Logisim is better than whatever you're using

Your truth table has 64 entries my dude.

This is why I was wondering if its possible to make a circuit with gates that output 1's or 0's based on certain conditions, for example:

get a 1 or 0 depending on if all or on/off
get a 1 or 0 depending on if there is an even or odd number
get a 1 or 0 dependent if there is one witch left one or off

basically create condition where the series of outputs narrow down the properties of the number 2.

good luck op
i'm not autistic enough to finish this.

Attached: just-fuck-my-shit-up-2018-10-20_17.45.19.webm (1438x878, 1.33M)

If you only need 7 unique outputs, then you only need 3 inputs.

FIGURED IT OUT

I used the kmap to make the Boolean but it was a lot of strain, just tested it:

A'.B'.C.D
A'.B.C'.D
A'.B.C.D'
A.B'.C'.D
A.B'.C.D'
A.B.C'.D'

You can see the obvious pattern here where you use the same amount of NOTs to the amount of switches you want.

just need to express this using universal gates now, not basics.

>XORing for orange
You're doing it wrong. XOR gives you parity/oddness, not "all but one".

>what's an efficient way to do this?
Eyeballing it would be easier than K-maps. Let *=And, +=Or, ⊕=Xor

Red = F1*F2*F3*F4*F5*F6

Orange = F1*F2*F3*F4*(F5⊕F6) + F1*F2*(F3⊕F4)*F5*F6 + (F1⊕F2)*F3*F4*F5*F6
The missing one must be 5 xor 6 or 3 xor 4 or 1 xor 2

Yellow=F1*F2*((F3⊕F4)*(F5⊕F6) + (F3⊕F5)*(F4⊕F6)) + (F1⊕F2)*(F3*F4*(F5⊕F6) + (F3⊕F4)*F5*F6) + Not(F1)*Not(F2)*F3*F4*F5*F6
You have both F1 and F2 and you want 2 of the others OR you have but one of them and you need 3 of the others OR you have neither of them and all the others. Still better than the 15 terms needed to brute force it.

White=(F1⊕F2)*(F3⊕F4)*(F5⊕F6) + (F1⊕F3)*(F2⊕F4)*(F5⊕F6) + (F1⊕F5)*(F3⊕F4)*(F2⊕F6) + (F1⊕F2)*(F5⊕F4)*(F3⊕F6)
You could add more terms but they're redundant. Vastly better than the 20 terms needed to brute force it.

Or just add them with 2 1bit adders (with carry in's) and then to a 2bit adder

X0 = F1⊕F2⊕F3
X1 = F1*F2 + F2*F3 + F3*F1
Y0 = F4⊕F5⊕F6
Y1 = F4*F5 + F5*F6 + F6*F4
S0 = X0 ⊕ Y0
S1 = (X0*Y0)⊕X1⊕Y1
S2 = X0*Y0*(X1+Y1) + X1Y1

Red = S2*S1*Not(S0)
Orange = S2*Not(S1)*S0
Yellow = S2*Not(S1)*Not(S0)
White = Not(S2)*S1*S0

Probably uses more gates but easier to see.

You did your own homework? Good!

...

>efficient
>not using AND, NOT, OR
Wew lad

Now run your boolean through demorgan's thereom and see if the amount of gates decreases using nand gates.

>gates
Meant total amount of chips

>White=(F1⊕F2)*(F3⊕F4)*(F5⊕F6) + (F1⊕F3)*(F2⊕F4)*(F5⊕F6) + (F1⊕F5)*(F3⊕F4)*(F2⊕F6) + (F1⊕F2)*(F5⊕F4)*(F3⊕F6)

You can do it in 3 terms by just cycling terms

White=(F1⊕F2)*(F3⊕F4)*(F5⊕F6) + (F5⊕F2)*(F1⊕F4)*(F3⊕F6) + (F3⊕F2)*(F5⊕F4)*(F1⊕F6)

/thread

It's hard to spot XORs with Karnaugh map

A!B+B!A is hard to spot for you?

When you have more than 2-3 variables, it becomes less clear.

Shouldn't Argentinia give black light?

damn i remember getting 100/100 points on my logic circuits course 4-5 years ago

i cant remember shit outside of basic gates and how to minimize a karnaugh map

Attached: 1538653370945.png (750x775, 930K)

what is yall's field and position?

Then go look up a Boolean algebra course. There'll be something you can do for free or watch some YouTube vids. If you care about getting good at this be vigorous. Learn it properly.

They claim to be white.

Make a truth table and then a kmap

CpE

>Hey guys I'm trying to get good at using gates without using basic gates (AND, OR, NOT).
Might as well go down to transistors. You are building AND,OR,NOT anyway.

What's the best free software for circuit simulation?

lmao dude just use if
else if
else if
else if
else if

depends on the complexity of the circuit and the level of depth you need. I used some free *spice program for simple circuits, I don't remember which one, and I used microwind if I had to go deeper and design the ports themselves or other components at a physical level.

VHDL
H
D
L

Kmaps suck for "exactly n out of m bits", you will end up with the OR of all n choose m combinations containing all the variables or their negation ANDed together.