Questions tagged [circuit]

In a programming context, a circuit usually refers to a combination of logical operators to achieve a desired response. Use this tag to ask about basic logical implementations and loops you can't get your head around.

In a programming context, a circuit usually refers to a combination of logical operators to achieve a desired response. This could be implemented in hardware (see: electronic/electrical engineering) but in software the key issue is the logic.

Use this tag to ask about basic logical implementations and loops you can't get your head around.

Logical operators include AND, OR, NOT, NAND and NOR gates, and judicious combinations of these can be used to construct just about any possible structures.

303 questions
1
vote
1 answer

Full subtractor using half adders

Is it possible to create a full subtractor using half adders only? I have created a circuit with 2 half adders but cannot see how I can use half adders to get the borrow. This is what I have done so far: https://i.stack.imgur.com/sO6bK.png I need to…
Algoprog
  • 21
  • 1
  • 5
1
vote
1 answer

VHDL Code for Binary Division bug

I've written code for a binary divider that takes in an 8 bit dividend, 3 bit divisor, and gives a 5 bit quotient (3 bit remainder). I've literally spent hours trying to fix a bug that gives incorrect results but I haven't been able to identify it.…
1
vote
1 answer

how to minimize this logic (or-gate CNF)?

I'm writing down the truth table for the OR-gate in a circuit satisfiability problem (this has to do with reduction of the 3-satisfiability problem). I have: a b c c = (a OR b) 1 1 1 1 1 1 0 0 1 0 1 1 1 0 0 0 0 1 1 1 0 …
user2303557
  • 225
  • 1
  • 6
  • 15
1
vote
1 answer

Converting logic gates to a purely NAND implementation, how come this is valid?

So Im doing some exercises with answers provided on conversion to a purely NAND gate implementation. I understand how the 2 AND gates and the OR gate connecting them were converted, by double negation but how come the OR gate connecting b and c can…
jantristanmilan
  • 4,188
  • 14
  • 53
  • 69
1
vote
2 answers

Should I eliminate inputs in a logic circuit design?

Recently I had an exam where we were tested on logic circuits. I encountered something on that exam that I had never encountered before. Forgive me for I do not remember the exact problem given and we have not received our grade for it; however I…
munchschair
  • 1,593
  • 3
  • 19
  • 43
1
vote
1 answer

Using your computer as a signal generator

I'm not quite sure where to post this question, but I think Stack Overflow has a lot of smart people who could help. I'm wondering if there is a way I can combine programming and electrical circuits. Can I somehow turn my computer into a signal…
DWade64
  • 427
  • 2
  • 4
  • 12
1
vote
2 answers

Advice on logic circuits and serial communications

As far as I understand the serial port so far, transferring data is done over pin 3. As shown here: There are two things that make me uncomfortable about this. The first is that it seems to imply that the two connected devices agree on a signal…
Spencer Ruport
  • 34,865
  • 12
  • 85
  • 147
1
vote
1 answer

How to start this truth table from function

I understand truth tables and do them fine when it's Z = A + B + ABC' etc. but how do I start a truth table where I'm suppose to take the function Y = 2X + 3 and construct a truth table from that? X is the input 3 bit(x1x2x3) and Y is the output…
user2318083
  • 567
  • 1
  • 8
  • 27
1
vote
2 answers

State Space and circuit simulator

As far as I know there is no state-space based general purpose circuit simulator around. Though there are certain algorithm to figure out how to find state-spaces (unique?) in a circuit (represented by graphs). Has anyone tried writing a program to…
Dilawar
  • 5,438
  • 9
  • 45
  • 58
1
vote
1 answer

Designing a combinational circuit for a vending machine

I want to design a combinational circuit for a vending machine, that delivers 2 items, tea( 2$) and water(1$). The machine accepts up to 3 dollars. # I draw the truth table with 3 inputs(dollars) and 2 outputs(tea & water). d1 d2 d3 : t …
shosh
  • 13
  • 5
1
vote
1 answer

How to convert a splitter in an input in Logisim

Hi I am creating a circuit in Logisim and I am using a counter and a splitter. What i want to do is the following. I have 3 single inputs bits(S0, S1, S2) that are connected to a splitter. My question is how do I connect the splitter signal to the…
1
vote
0 answers

Can I use waitfor to detect task or timeout

I am writing a program in Dynamic C for a rabbit BL2600 board. The program is controlling a pressure chamber a top chamber and a bottom chamber with metal in between checking for perforation. I have a sensor on my pressure regulator and a sensor…
user2479061
  • 9
  • 1
  • 1
  • 5
1
vote
2 answers

Pspice simulation window not there?

For some reason I don't have the File Edit Trace Plot View Tools Window Help options when I run the simulation, where is the option to reset it?
Ammar
  • 1,203
  • 5
  • 27
  • 64
1
vote
2 answers

How to compute two's-complement

How would you get the 2's complement of a 4 bit number without explicitly using 0001 in the formula (using power - 1111 - or ground - 0000)? I tried using a splitter but reconstructing the separate 1 bit numbers back to a 4 bit number did not work.
1
vote
1 answer

How do I express a boolean expression comprised of AND, OR and NOT using only AND and NOT?

Say I have the following boolean expression: (A^B^C) v (~A^~C) How could I express that using only AND (^) and NOT (~)? I don't want the answer, just how I would go about doing it.
Doug Smith
  • 29,668
  • 57
  • 204
  • 388