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
51
votes
9answers
239k 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 ...
40
votes
5answers
17k 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 ...
36
votes
6answers
7k 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 -> ...
31
votes
2answers
18k 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, ...
29
votes
4answers
93k 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 ...
29
votes
5answers
6k 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 ...
29
votes
6answers
8k 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 ...
28
votes
2answers
5k 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 ...
27
votes
5answers
38k 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?
27
votes
7answers
108k 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 ...
26
votes
15answers
43k 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
4answers
6k 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 (...
26
votes
4answers
3k 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 ...
25
votes
6answers
7k 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 ...
24
votes
7answers
8k 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 ...
24
votes
8answers
11k 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 these chips....
24
votes
3answers
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
5answers
4k 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 ...
24
votes
6answers
20k 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 ...
24
votes
6answers
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 ...
21
votes
3answers
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 | |--------+---...
19
votes
10answers
5k 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 ...
19
votes
4answers
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 ...
19
votes
3answers
3k 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 ...
19
votes
2answers
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 ...
19
votes
1answer
7k 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 ...
18
votes
8answers
4k 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'...
18
votes
5answers
32k 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 '...
17
votes
2answers
13k 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 (...
17
votes
8answers
45k 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 ...
16
votes
6answers
25k 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 ...
16
votes
2answers
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 ...
15
votes
6answers
3k 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. ...
15
votes
5answers
1k 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
6answers
561 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 ...
14
votes
2answers
698 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: ...
14
votes
4answers
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 ...
14
votes
1answer
48k 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 ...
14
votes
4answers
11k 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 that possible? One way may be to just use a look up table since I'...
14
votes
5answers
23k 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 ...
14
votes
3answers
10k 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 ...
14
votes
1answer
593 views

Parallel prefix adder cells in Negabinary

I'm trying to design a parallel prefix adder for a negabinary based adder. Negabinary is base \$-2\$ instead of the familiar base \$2\$ binary. Each 1 bit adder generates a sum and two (instead of one ...
13
votes
6answers
4k 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 ...
13
votes
4answers
7k 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 ...
13
votes
4answers
5k views

Need an XOR gate that works up to 2 to 3 GHz

I have encountered an unusual situation in which I require an XOR gate that will function reliably when presented with a square wave input with a frequency between 2 and 3 GHz. I know that desktop ...
13
votes
4answers
2k views

General question about analog and digital signals

Newbie alert: I am not an electrical engineer, nor have I ever taken electrical engineering, so please bear with me. Whenever I read about the distinction between digital and analog signals, a ...
13
votes
2answers
61k 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 ...
13
votes
4answers
1k views

What logic family is best for general-purpose hobbyist stuff?

I need to buy a few logic ICs. Which family should I get? HC? HCT? Which kind is best to have lying around in a parts box, for maximum compatibility with unpredictable future projects? Wide supply ...
13
votes
6answers
3k views

memory for the simplest possible computer (Pi0K)

I'd like to build the simplest possible computer. I don't care about speed or storage, indeed having slow speed and low storage is a huge advantage as I want to build it out of transistors (ideally ...
13
votes
5answers
16k 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 ...