Questions tagged [digital-logic]

Digital electronics treats discrete signals, unlike analog electronics that treat continuous signals. Digital logic is used to perform arithmetic operations with electric signals, and constitutes the base for building CPUs.

Filter by
Sorted by
Tagged with
61 votes
9 answers
269k views

Difference between latch and flip-flop?

What is the difference between a latch and a flip-flop? What I am thinking is that a latch is equivalent to a flip-flop since it is used to store bits and is also equivalent to a register which is ...
46 votes
5 answers
22k views

Why are things like RESET/MCLR active low on most ICs?

Convention? Easier to implement? Another reason? Is there a reason things like MCLR or RESET on microcontrollers are active-low, that is, you have to pull them down to reset the IC, and pull them ...
  • 31.2k
39 votes
6 answers
9k views

Is analog signal arithmetic faster than digital one?

Would it be theoretically possible to speed up modern processors if one would use analog signal arithmetic (at the cost of accuracy and precision) instead of digital FPUs (CPU -> DAC -> analog FPU -> ...
  • 487
38 votes
7 answers
143k views

How is an XOR with more than 2 inputs supposed to work?

I've just started studying computer engineering, and I'm having some doubts regarding the behavior of the XOR gate. I've been projecting circuits with Logisim, whose XORs behave differently from what ...
38 votes
2 answers
31k views

Why do some pins have `~` signs next to their numbers?

I was looking at my Arduino Uno and I noticed that symbol by digital pins 11, 10, 9, ...
33 votes
4 answers
124k views

How to invert a digital signal

I need a way to invert a digital signal i.e. if the input is high, I want the output to be low and if the input is low I want the output to be high. I think this can be accomplished with a single ...
  • 1,887
32 votes
7 answers
10k views

Why have two NOT gates in series?

I have recently been looking at the datasheets for the 74HC139 IC in order to see if it was suitable for my project, and have come across the following logic diagram which strikes me as a little bit ...
31 votes
5 answers
7k views

Why don't we see faster 7400 series chips?

The 74HC series can do something like 20MHz while 74AUC can do something like maybe 600MHz. What I'm wondering is what sets these limitations. Why can't 74HC do more than 16-20MHz while 74AUC can and ...
  • 723
31 votes
2 answers
8k views

How do computers calculate sin values? [closed]

How does a computer calculate a sin value? Logically, when I think about it the only apparent way is to put many sin values into memory, and when a sin value needs to be "calculated" it would just ...
  • 777
30 votes
4 answers
5k views

Why aren't resistors being used in this flip-flop used in static MOS RAM?

In the book, Digital Computer Electronics, there is a diagram on page 140 (figure 9-4 a) of a flip-flop used in static MOS RAM to store a bit. The book says that Q3 and Q4 act like resistors, which ...
29 votes
5 answers
44k views

How are logic gates created electronically?

So we have AND, NOT, NAND, NOR, OR gates, but how are they created electronically/electrically? For example, what makes NOT gate reverse the value?
  • 471
29 votes
4 answers
9k views

Why is it good to slow down digital lines with resistors?

I've heard that sometimes it is recommended to "slow down" a digital line by putting a resistor on it, let's say a 100 ohm resistor between the output of one chip and the input of another chip (...
  • 3,329
28 votes
5 answers
5k views

Why does a single AND gate need 60 transistors?

Looking at the datasheet for the MC74VHC1G08, under the features section, it states Chip Complexity: FETs = 62. Why does this IC need 62 transistors, while an AND ...
  • 622
27 votes
6 answers
9k views

What is a flip flop?

There seem to be a number of different definitions of flip-flops and latches out there, some of which are contradictory. The Computer Science text book for the course I teach is probably the most ...
  • 491
26 votes
6 answers
7k views

Why would an AND gate need six transistors?

I'm taking a digital design course, and I've been told that a NAND gate needs four transistors to implement and an AND gate needs six (four for a NAND gate and two for an inverter). That makes sense ...
  • 371
26 votes
15 answers
46k views

Beginner's logic analyzer?

Can anyone recommend a low cost or DIY buildable logic analyzer? Mostly, it would be for debugging serial protocols (SPI, I2C, RS232) at low voltages.
26 votes
8 answers
12k views

Is it worth it learning how to use 7400 series "jelly bean" logic IC's or are they completely obsolete?

My road map for learning electronics included the 7400 series logic chips. I started in on electronics by following the labs in the "Art of Electronics" lab manual which includes labs with ...
26 votes
4 answers
4k views

Why old PMOS/NMOS logic needed multiple voltages?

Why does old PMOS/NMOS logic needed multiple voltages like +5, -5, and +12 volts? For example, old Intel 8080 processors, old DRAMs, e.t.c... I'm interested in the causes on the physical/layout ...
  • 3,231
25 votes
7 answers
12k views

What will happen if the output from a NOT-gate injected- BACK to its OWN input?

Not-gate, if get a 0(Off) input, it gives an 1 (On) output. And if get a 1 (On) input, gives-back a 0(Off) output. Now, if-I could bring the output back to the input of the not-gate, then what will ...
25 votes
8 answers
4k views

What are the advantages of using FPGAs over TTL in intro computer architecture?

I teach the one and only computer architecture course at a liberal arts college. The course is required for the computer science major and minor. We do not have computer engineering, electrical ...
24 votes
3 answers
5k views

How does a 40 Gbit/s Ethernet interface process packets in silicon?

A 40 Gbit/s Ethernet interface should have a 40 GHz signal on it. How does common silicon IC technology handle such an exotic beast? My best guess is that internally various parallel busses are used, ...
24 votes
6 answers
25k views

Why are NAND Gates cheap?

In my digital electronics labs and lectures we are told to try and make things from NAND gates, because they are the cheapest kind of gate available to buy. Why is this? Why isn't an OR/AND gate the ...
  • 8,358
22 votes
4 answers
10k views

Why is the + sign commonly used as logic OR operator?

A few days ago I was asked, why it is pretty common to use the + instead of the v symbol as the boolean OR operator in digital ...
  • 9,839
21 votes
3 answers
5k views

What is a Patty Code?

In my digital logic lecture today, my professor introduced a symbol code called Patty Code. I copied this table off the whiteboard: | Symbol | Binary | Odd Patty | Even Patty | |--------+---...
  • 321
21 votes
5 answers
41k views

Why do we clock Flip Flops?

I am trying to understand Flip Flops & Latches. I am reading from Digital Logic book by Morris Mano. One thing I am not able to understand is why we clock flip-flops? I understand why we need '...
  • 595
20 votes
9 answers
62k views

Make a momentary switch control a toggle

What are the simplest, cheapest, smallest ways to make a momentary switch produce a 2-state toggling output (latching momentary switch)? In other words, the output is continuously low, and when you ...
  • 28k
19 votes
10 answers
6k views

Is there any way to use half-bits?

As most people here know, by using 4 bits, we are able to count from 0 to 15 (0123456789ABCDEF in hexadecimal). But if we were to only count up to 9, we would still be using 4 bits, and the digits ...
  • 191
19 votes
4 answers
4k views

Why aren't fully asynchronous circuits more prevalent? [closed]

From my understanding, most modern consumer CPU's are based on synchronous logic. Some high-speed applications (signal processing, etc.) use ansync logic for its higher speed. However, in today's ...
  • 301
19 votes
3 answers
4k views

SRAM isn't blank on powerup, is this normal?

I had finally finished my Z80 memory board, but I was disappointed to see that it wasn't working properly (simple NOP test with the address lines connected to some LEDs) as the counter quickly ...
  • 317
19 votes
2 answers
2k views

Why does connecting a high-current device to my digital circuit cause weird behavior?

I have a arduino microcontroller other digital thing and when I connect a motor pump heater other high current thing I experience weird ADC measurements reboots crashes errors in digital ...
  • 55.7k
19 votes
2 answers
16k views

transmitting 5v signal over a long cable

I'm seeking for help here as I need a reliable answer to this. I need to get an input signal (low frequency 5v digital pulse), to a micro-controller from a (...
19 votes
1 answer
9k views

Getting a large number of (~100) digital output signals from Arduino

I would like to be able to control around 100 independent LEDs using an Arduino. The problem is that the Arduino does not have nearly enough pins that can be configured for this. What would be a way ...
  • 2,679
18 votes
8 answers
5k views

Ribbon Cable Cross Talk - Is there a fix after the fact?

I'm involved in a project where the customer defined pins in a ribbon cable, without considering possible cross-talk issues. The signals are 1 MHz data signals with no ground wire separating them. I'...
  • 379
18 votes
6 answers
31k views

How is binary converted to electrical signals?

I'm just starting off in electronics and am already fascinated. Having played with an Arduino these past few days I'm aware that binary is a representation of different voltages - such as +5V ...
  • 281
18 votes
5 answers
20k views

Why does active low even exist?

In my career I've often encountered signals that are active low (Reset being the most common). I've even seen interfaces where all control signals are actively low. To me, this is very unintuitive ...
16 votes
4 answers
4k views

What is the lowest level of CPU programming above transistors?

In my CS program, my professor has claimed that NAND gates are the most basic gate to engineer, and so every other gate and higher-level circuits found in CPUs are made from NAND gates (no source ...
16 votes
6 answers
5k views

Why do cascading D-Flip Flops prevent metastability?

I understand what metastability is but don't understand how linking together flip flops reduces this? If the output of the first flipflop is metastable, this gets used as input for the second one. ...
  • 163
16 votes
2 answers
80k views

Why is NAND gate preferred over NOR gate in industry?

I have read at numerous places that NAND gate is preferred over NOR gate in industry. The reasons given online say: NAND has lesser delay than Nor due to the NAND PMOS (size 2 and in parallel) when ...
  • 359
16 votes
4 answers
15k views

Calculating the square root of 8-bit binary number

I was looking for a way to calculate the square root of a given 8-bit number using only digital combination or sequential logic. Is this possible? One way may be to just use a look-up table since I'm ...
  • 3,847
16 votes
2 answers
2k views

Can anybody identify this component (SPRAGUE 663044-4) on this vintage electronic?

I am repairing a vintage Seeburg/Gulbransen 'Select-a-Rhythm' drum machine from 1967, the kind you would sit on top of your organ and play along with. I am trying to distinguish what this component ...
  • 175
15 votes
4 answers
9k views

74HC/HCT: What to do with unused inputs and why?

If I'm using an IC in the 74HC or 74HCT family, and I'm not using all the input pins, I understand that I should not leave them unconnected because they will float. But what exactly should I do with ...
  • 253
15 votes
4 answers
2k views

Digital Logic circuit - exam question

I have a question from exam that I failed to solve: I need to build a digital logic circuit that is receiving 4 bit number and return true if the number is ...
  • 252
15 votes
4 answers
7k views

What is the beginning state for Q in a SR latch?

In this diagram what would be the beginning state for Q? Since the first NOR for S and R rely on previous results, there must be something for the first iteration? NOTE: I'm in a first year ...
  • 271
15 votes
5 answers
26k views

How to understand the SR Latch

I can't wrap my head around how the SR Latch works. Seemingly, you plug an input line from R, and another from S, and you are supposed to get results in Q and Q′. However, both R and S require input ...
15 votes
3 answers
11k views

Why are flip-flops usually triggered on the rising edge of the clock?

Usually in digital design, we deal with flip-flops that are triggered on a 0-to-1 clock signal transition (positive-edge triggered) as opposed to on a 1-to-0 transition (negative-edge triggered). I ...
15 votes
5 answers
2k views

Which CMOS logic families can safely be used to construct linear circuits?

I've just learned that digital CMOS inverters can be configured to perform analog functions (most notably oscillators and amplifiers). However, many of the examples tend to favor old CD4000-series ...
14 votes
6 answers
5k views

Why do we need to use transistors when building an OR gate?

Why do we need to use transistors when building an OR gate? Wouldn't we be able to achieve the same result without transistors at all, just by joining the two ...
  • 259
14 votes
6 answers
615 views

Microcontrollers - are the output states constant or multiplexed?

PWM obviously require computing resources (and thus cannot be done simultaneously with other processes), but if I were to set a pin as output 5V or 0V, do these states remain constant or are they ...
  • 3,411
14 votes
2 answers
733 views

What type of Boolean logic circuit is this?

I need help confirming some hunches. I'm trying to figure out what type of circuit this is: Any ideas? Also, I think the logic expression for this is: ...
's user avatar
14 votes
2 answers
53k views

analogRead(0) or analogRead(A0)

The arduino reference states that you would use the following code to read the value from analog pin #5: int val1 = analogRead(5); However to read from digital ...
  • 377

1
2 3 4 5
85