Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

logic circuit to find out addresses

Status
Not open for further replies.

shravzz18

Newbie level 3
Joined
May 10, 2017
Messages
4
Helped
0
Reputation
0
Reaction score
0
Trophy points
1
Activity points
34
hello,

I have question regarding the encoding...please help me out with this.

I have a 4 bit input..lets say 0101 (right side bit being the most significant bit)..Now my logic(probably encoder) should give out address of all the 1's in the 4 bit input.
i.e., the output should be 11 and 01.

Can this be possible?
 

Yes, it's possible. Do you have a more specific question?

(Unless this represents a serial stream, the convention is MSB is on the left.)
 

Hi,

We see that the input is 4 bit binary..

But what is your output? Define it please.

Klaus
 

hello,

my input is a 4 bit binary...and my output should be 2 bit binary.

let's say that the input is 1010. If I go with a priority encoder I get the output as 11( which is the address of the MSB)

But for my application I need the addresses of both the 1's present in the 4 bit input.
I.e, the output should be 11 and 01 receptively.
 

hello,

... my output should be 2 bit binary.

...i.e, the output should be 11 and 01 receptively.

Well, then, it can't be a 2 bit binary output, can it? I don't think you actually understand what you want. I know I sure don't.

What if the input is 1111? Your "output" should be 00 01 10 11? Does this mean you need an eight bit output?
 

1. If you have a 4-bit input initialize a counter to 3 (i.e. 0b11).
2. Now if the MSB (the right most bit) is 1 then multiplex out the counter, otherwise send 00,
3. shift the 4-bit value right (towards the MSB)
4. check the counter if it is 0, then jump to step 6, otherwise decrement the counter.
5. repeat steps 2 thru 4 for the next 3 bits.
6. Done.
 

Hi,

Your task isn't elaborated.

Your task simply is not possibke with just two output bits.
Draw a truth table and you will see.

Pleases rethink your task.

An example: with 2 output bits there are four possible output states: 00, 01, 10, 11
Which of the four states do you expect if the input value is 0000?

Klaus
 

I need to incorporate a clock into the design. For every positive edge of the clock my output should change.

if the input is 1111...during first positive edge of the clock my output should be 11
and during second edge it should be 10 and so on
 

Hi,

Yes a clock....but no truth table...

What is the output state when input is "0000"?
Or:
What if the input value changes after the second clock edge?
What if the next input value is the same as the value before?
What is the output value after the 5th clock edge?

Klaus
 

I will have a clock running with a period of 2ns.

My input will not change for 8ns.
so, during this 8ns time I can get four different output values(if all the input values are 1)


after 8ns new input values comes in and so does the output values
 

Hi,

Again:
What is the output value, or what are the four output values if input is "0000"?

Soner or later you need a trueth table...
And now that you have a clock you need a timing diagram, too.

Klaus
 

Status
Not open for further replies.

Similar threads

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top