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
-2
votes
1 answer

How to efficiently reduce this logic sentence?

I have a sentence that describes a circuit, like this: I x (Q1 x Q0 + not Q1 x not Q0) + not I x (not Q1 x Q0 + Q1 x not Q0) I have translated it like this: I and ((Q1 and Q0) or (!Q1 and !Q0)) or !I and ((!Q1 and Q0) or (Q1 and !Q0)) -> I and ((Q1…
Mattia Righetti
  • 1,265
  • 1
  • 18
  • 31
-2
votes
1 answer

Why can't we use a magnitude comparator through programming languages?

I just learned about the magnitude comparator circuit. A MC would tell with three bits: m < n m = n m > n So far I did not encouter a programming language, that would offer such an operation. I also can't remember an assembly statement for that. Is…
TheTrowser
  • 363
  • 4
  • 14
-2
votes
2 answers

What assembly instruction is this circuit setup represent (or application in real life programming)?

This is a school question (I know some hate this), but I tried and really couldn't think of an answer. I suspect this circuit will do some simple instruction. So if you had an input like 1101 (representing x blocks) and 0001 (representing y…
John Doe
  • 55
  • 1
  • 2
-2
votes
1 answer

How can I draw a logic circuit of function F = (A+BCD)(A'+B'C'D') using 3 Xor gate and 1 AND gate?

i want to simplify the function first but i have no idea how to do it. already tried few ways but failed. I think i have to use dmorgan's law or x xor y = x'y + y'x or something more.. can anyone help?
-2
votes
2 answers

Logic level and switch direction in relation to circuit

I am new to logic design and circuity. I saw two diagrams from a learning resource that are circuits will supposed operate an LED light as shown below: Diagram A: Diagram B: Based upon these two diagrams I am trying to understand the logic level…
SamSmith
  • 167
  • 1
  • 3
  • 13
-2
votes
1 answer

Constructin an circuit from bacic logic gates

I have n inputs and n corresponding outputs, the state of output N° i depends on the state of the input N° 1 to n, EXCEPT N° i. To be more precise, if any of the input 1 to n except i is true, then the corresponding output is true; If all of the…
wormz
  • 1
  • 2
-2
votes
1 answer

How do I create a circuit based on a Boolean function using only a multiplexer?

I need to create a circuit based on the Boolean function: Y = AB’ + B’C’ + A’BC using only an 8 to 1 multiplexer. Then recreate the circuit using only a 4 to 1 multiplexer and NOT gates. I figured the truth table to be: A B C | Y 0 0 …
page4
  • 123
  • 1
  • 4
  • 13
-2
votes
1 answer

What approach should I take for electronics simulator or similar?

I would like to build an app which is quite similar to electronics simulator. I mean any simulator with nodes interconnecting each other. What are possible solutions for this? For example it is quite simple for a diagram like this: But what…
lukas.pukenis
  • 13,057
  • 12
  • 47
  • 81
-2
votes
1 answer

How do I use pickit 2

Hey everyoneI have a pickit 2 and I am a bit confused about the wiring to the micro-controller. I found what each pin is but I was wondering if I just directly wire them or if I need to use any capacitors or diodes. If you can supply a diagram that…
36redsoxfan
  • 250
  • 2
  • 5
  • 15
-3
votes
0 answers

New to computer circuitry, need microcontroller of LED Lightboard

Heyo, I have absolutely zero experience with computer circuitry and I want to get into it by the means of building a 32 by 32 LED light grid, which can be programmed with BASIC. I want to use a Texas Instruments Arm microprocessor to process the…
NLKD
  • 1
  • 1
-3
votes
0 answers

How to create a 4-bit circular shift register which shifts by 2 bits?

Question: Create a 4-bit circular right shift register. If the number is odd then it will shift 1 bit and if the number is even then it will shift 2 bits. Input: 1110 (even number) 1st clock pulse: 1011 2nd clock pulse: 1110 I have created the 4-bit…
-3
votes
1 answer

How can you connect a 4 ohm 3 watt speaker to arduino mega?

I am currently using an Arduino Mega 2560 and before I tried hooking it up with a big speaker to play sounds and I want to connect the arduino to a smaller one and I have a spare 4 ohm 3 watt speaker that I don't use.
Kean
  • 3
  • 1
-3
votes
1 answer

What is the equivalent hardware circuit to this code?

What does this code say? How do i interpret its circuit? module add(input logic clock, output logic[7:0] f); logic[7:0] a, b, c; always_ff @(posedge clock) begin a <= b + c; b = c + a; c = a + b; end assign f = c; …
-3
votes
2 answers

Python: euler circuit and euler path

I've got this code in Python. The user writes graph's adjency list and gets the information if the graph has an euler circuit, euler path or isn't eulerian. Everything worked just fine until I wrote this at the end: ln1 = [1, 2, 1, 6, 2, 3, 3,…
Matthew
  • 67
  • 1
  • 9
-3
votes
1 answer

What is this logical circuit and how does it work?

This is the logic circuit I've drawn a truth table and I've found that when: C and D are true, then Q is true and complement Q is false C is true but D is false, then complement Q is true and Q is false The rest I don't see how you could know. Any…
JohnDoe
  • 61
  • 1
  • 1
  • 4