How to Design an N-bit Gray-to-Binary Converter?

  • Thread starter Thread starter XcKyle93
  • Start date Start date
  • Tags Tags
    Converter
Click For Summary

Discussion Overview

The discussion revolves around designing an n-bit Gray-to-binary converter, focusing on the interpretation of the design task within the context of a Digital Logic class. Participants explore whether the design should be a logic circuit or an algorithm, and how to apply learned concepts such as truth tables and Boolean functions to this problem.

Discussion Character

  • Homework-related
  • Debate/contested
  • Conceptual clarification

Main Points Raised

  • One participant seeks hints on how to approach the design of an n-bit Gray-to-binary converter and expresses confusion about the term "design."
  • Another participant suggests that the design could be in software, questioning the direction of the assignment and the representation of bits.
  • A different participant asks if truth tables and Boolean expressions have been covered, proposing the combination of existing Boolean expressions into a single expression.
  • One participant clarifies that the problem is for a Digital Logic class and expresses uncertainty about whether to design a logic circuit or an algorithm.
  • Another participant raises the concern that defining an n-bit logic converter in hardware might be challenging without knowing the value of n, leaning towards an algorithmic solution.
  • One participant suggests that a circuit diagram similar to a half-adder might be required, while another expresses unfamiliarity with the half-adder concept.
  • A later reply prompts participants to consider what their classmates think about the design task.
  • One participant concludes that they figured out the problem with the help of others.

Areas of Agreement / Disagreement

Participants do not reach a consensus on whether the design should be a logic circuit or an algorithm, with multiple competing views expressed throughout the discussion.

Contextual Notes

Participants express uncertainty regarding the specifics of the design task, including the implications of the term "design" and the handling of the variable n in the context of hardware versus software solutions.

XcKyle93
Messages
32
Reaction score
0

Homework Statement


Desigh an n-bit Gray-to-binary converter.


Homework Equations


bn-1 = gn-1
bk-1 = gk-1 if bk=0
bk-1 = [itex]\overline{g}[/itex]k-1 if bk=1

The Attempt at a Solution


I just want someone to give me some hints as to how I should approach this problem... Also, when it tells me to "design,"" does it mean it wants me to design a logic network? I am confused!
 
Physics news on Phys.org
You didn't mention what the class is for, so I don't know if you're supposed to do the design in software or with logic. I'm guessing probably software. Also are the bits numbers right to left (least signifcant to most signficant), but this may not matter since you're given equations.

If you're doing this in software, you could use an array of bytes, with each byte holding just one bit. If this is C language, you could use bit fields. You just need to impement the software so it follows the rules in the relevant equations.
 
Have you learned how to write truth tables? And then convert them to Boolean expressions?

It seems that they have given you the Boolean expressions already for a one bit stage of the converter.

Can you combine the second and third one into a single expression without the if condition using AND and OR logic?
 
This problem is for my Digital Logic class. And yes, we have learned how to write truth tables and apply them to Boolean functions. In fact, in this chapter, we learned about combinational networks and how to draw basic logic circuits. I know what gray code is , of course, but I just don't know how to apply what I've learned to the problem. What is of particular confusion to me is how it just says "design." Design what? A logic circuit? An algorithm? Especially because in the next part of the problem it says "Using the above algorithm as a starting point..." If it is just an algorithm, how do I go about writing one?
 
Wouldn't it be kind of difficult to define an n-bit logic converter in a hardware circuit, not knowing the value of n? I'm guessing you want an algorithm, not a circuit.
 
XcKyle93 said:
This problem is for my Digital Logic class. And yes, we have learned how to write truth tables and apply them to Boolean functions. In fact, in this chapter, we learned about combinational networks and how to draw basic logic circuits. I know what gray code is , of course, but I just don't know how to apply what I've learned to the problem. What is of particular confusion to me is how it just says "design." Design what? A logic circuit? An algorithm? Especially because in the next part of the problem it says "Using the above algorithm as a starting point..." If it is just an algorithm, how do I go about writing one?

I think they want you to design a circuit diagram similar to designing a half adder circuit.
 
jedishrfu said:
I think they want you to design a circuit diagram similar to designing a half adder circuit.
I don't think so; I don't even know what that is! This "half-adder" circuit certainly isn't in the chapter.
 
You have discussed this task with other students in your class, what do they think is being asked?
 
I was able to figure it out everyone, thanks for your help.
 

Similar threads

  • · Replies 10 ·
Replies
10
Views
2K
  • · Replies 2 ·
Replies
2
Views
2K
  • · Replies 3 ·
Replies
3
Views
3K
  • · Replies 1 ·
Replies
1
Views
2K
  • · Replies 8 ·
Replies
8
Views
3K
Replies
1
Views
3K
Replies
2
Views
2K
  • · Replies 9 ·
Replies
9
Views
8K
  • · Replies 2 ·
Replies
2
Views
2K
Replies
3
Views
3K