Digital logic is the representation of signals and sequencing of a digital circuit. It is the basis for digital computing. (Note: There is the Electrical Engineering Stack Exchange website which is more suited to asking questions on hardware.)
Questions tagged [digital-logic]
229 questions
1
vote
3 answers
How to tell if an integer is signed or not?
How can I/computer tell if binary numbers are signed or unsigned integers?
Eg the binary number 1000 0001 can both be interpreted as -128, if signed, and 129, if unsigned.
One advantage of using unsigned integers in languages like C (as I…
user3675996
1
vote
1 answer
151 as an 8-bit signed binary number
Converting base 10 to base 2 n = 8
A= 49
B= 151
By doing so 49 is 00110001 and -49 would be 11001111.
I am having problems with finding 151 and -151 because after the conversion it is already an 8-bit number. 151 is 10010111, but in signed binary…

Rachel Dao
- 9
- 3
1
vote
1 answer
Booths multiplication algorithm extra bit at LSB
I have a confusion about the booth's multiplication algorithm. suppose we want to multiply two binary numbers A ( 7 bits) and B (7 bits) .
A= 00101011 (Multiplicand)
B= 00001100 (Multiplier)
initial product =00000000000000
now in the next step,…
user6663837
1
vote
2 answers
Flip-flop and latch inferring dilemma
Could someone explain to me why a latch would be inferred instead of a flip-flop?
always_ff @ (posedge clk, negedge rst)
begin
if (!rst)
a <= '0;
end
Shouldn't the fact that the always block is sensitive to a signal edge be enough to infer a…

evilpascal
- 117
- 3
- 12
1
vote
1 answer
VHDL Why is state S0 active when it isn't supposed to be?
I'm having some trouble with this piece of code. It seems that state S0 is always active, even when it is not supposed to be. It appears that the output of this state is inverted(active when it is supposed to be disabled). Any ideas? Print of the…

Paulo Gil
- 13
- 3
1
vote
1 answer
Sorting the bits of a 32-bit vector. Verilog
I need to do a design that sorts the bits of a 32-bit vector(not sure if it's called vector) like this:
1010010101010 => 00000001111111
I must have a 32-bit parallel in and a serial out and it must be combinational.
I tried something like…

Alex Mihai
- 21
- 3
1
vote
2 answers
Index constraint violation in vhdl
I've a problem with the simulation of my code. I have an asynchronous FIFO that is composed by a dual port memory. The write are performed synchronous to the writing clock, the read are performed providing the address of the location I want to read.…

haster8558
- 423
- 6
- 15
1
vote
1 answer
how to create a T- flip flop in ladder logic?
This is a bridge application where I need to alternate between 2 motors. Therefore, if you use motor 1 in the first raise/lower bridge cycle, you need to use motor 2 for the second bridge cycle. When the bridge is fully seated, there is a digital…

Dhananjay Ramesh
- 11
- 2
1
vote
1 answer
sum of minterm vs product of maxterm
Given the following Boolean expression of F(A,B,C): F(A,B,C) = A' + B + C'
Which of the following statements is/are true about the above expression?
(i) It is an SOP expression
(ii) It is a POS expression
(iii) It is a sum-of-minterms…

weejing
- 173
- 2
- 12
1
vote
1 answer
Static Hazard 1 and One Circuit Problems?
I read about Static Hazard. We know Static 1-hazard is: Input change causes output to go from 1 to 0 to 1.
My note covers a Circuit as follows:
My notes says: When B=C=D=1, for any changes in A values, it's probable to have Static Hazard 1.
But I…
user5912880
1
vote
3 answers
Boolean expression in SOP
I'm new to boolean expressions.
I've been given the task to simplify
F(w,x,y,z) = xy’ + x’z’ + wxz + wx’y by using K map.
I've done it and the result is wx’+w’y’+xyz.
Now I have to "Write it in a standard SOP form. You need to provide the steps…

Dominik Banialis
- 39
- 5
1
vote
1 answer
Implementing one-bit flags in a 32Bit ALU using Verilog
I am working on an assignment and am a little lost and don't really know how to get started. I need to implement the following flags in a 32Bit ALU:
• Z ("Zero"): Set to 1 ("True") if the result of the operation is zero
• N ("Negative"): Set to 1…

Scruffy Nerfherder
- 189
- 1
- 4
- 15
1
vote
1 answer
bit_vector bounds violation by static constant
Posting this question on SO and not EE is because I am struggling with coding/software imperfections.
I am new to VHDL and going through "Free range VHDL" book. Playing around with bit_vector I found out that to access single wire in a bus syntax…

hrust
- 734
- 1
- 11
- 34
1
vote
1 answer
4Way Demultiplexer circuit using Verilog
I am struggling here on an assignment for my digital logic class. I have searched online for resources, but there is not much that has proven to be helpful. It seems that everyone has a different approach than what we are doing in class. There is no…

Scruffy Nerfherder
- 189
- 1
- 4
- 15
1
vote
1 answer
Boolean expression to determine if 8-bit input is within range
Given the following in 8-bit 2s complement numbers:
11000011 = -61 (decimal)
00011111 = +31 (decimal)
I am required to obtain a boolean expression of a logic circuit whose output out goes high when its 8-bit input in (also in 2s complement…

JTJM
- 255
- 1
- 6
- 18