Write a function that implements such a converter

Assignment Help Basic Computer Science
Reference no: EM131412475

Function binary_to_gray

A binary-to-gray code converter was proposed in exercise 5.6. Write a function that implements such a converter, which should be constructed in the declarative part of the ARCHITECTURE (main code). In the code proper (architecture body), include a call to that function in order to test (simulate) it.
exercise 5.6:

Generic Binary-to-Gray Converter

The regular binary code, which consists of code words ordered according to their increasing unsigned decimal values, constitutes the most commonly used digital code. In some applications, however, gray code (Pedroni 2008), which is an UDC (Unit Distance Code) because any two adjacent code words di¤er by just one bit, might be preferred (in electromechanical applications, for example). This exercise deals with the design of a circuit capable of converting regular binary code into gray code.

a) Just to practice with gray code, make a table with two columns, placing the 16 four-bit binary entries in the first column, and the corresponding gray values in the second column.

b) In order to implement a generic converter, find a closed-form expression for binary-togray conversion. Use it to check your entries in the second column for part (a).

c) Write a VDHL code from which this converter can be inferred. Enter N (number of bits) as a GENERIC parameter, and use the closed-form expression obtained above to do the computations. Include simulation results in your solution.

Reference no: EM131412475

Questions Cloud

Determine the expected duration and variance for activity : 6-30 Sandy Edge is president of Edge File Works, a firm that manufactures two types of metal file cabinets. The demand for the  two-drawer model is 650 cabinets per week; demand for the three- drawer cabinet is 400 per week. Edge has a weekly oper..
Politics is driven by how people interpret informaion : Comment on the Debra Stone quote reprinted in the text: "Because politics is driven by how people interpret informaion, much political activity is an effort to control interpretations." What do you think of this idea that even information is politica..
List the endogenous and exogenous variables : List the endogenous and exogenous variables in the Beginning and Ending Balance Sheets, the Income Statement, and the Statement of Cash Flows.
Can your body make glucose from proteins and from fats : Can your body make glucose from proteins? from fats? Which fats are said to be healthier saturated or unsaturated? Why? Which cholesterol is said to be healthier, LDL or HDL? Why?
Write a function that implements such a converter : Write a VDHL code from which this converter can be inferred. Enter N (number of bits) as a GENERIC parameter, and use the closed-form expression obtained above to do the computations. Include simulation results in your solution.
What is political ideology : What is political ideology? (2) How would you describe your political ideology - not necessarily in terms of Democrat or Republican or Liberal or Conservative
What is your estimate of the number of meadow mice in field : You trap meadow mice in a hay field, and place ear tags on 45 individuals. A week later, you trap meadow mice in the same field, capturing 74 animals. Of these, 13 had ear tags. What is your estimate of the number of meadow mice in this field?
Discuss how the purpose of horses has changed over time : Discuss how the use/purpose of horses has changed over time and describe how the horse industry differs from the various livestock production animals we've discussed this term.
Government of canada securities : Why, in general, do investment opportunities offer a rate greater than that offered by Government of Canada securities for the same horizon?

Reviews

Write a Review

Basic Computer Science Questions & Answers

  Determine probability that selected cobalt gets more miles

Standard deviation 3.5 miles per gallon. Determine the probability that the randomly selected Cobalt gets more than 34 miles per gallon.

  Create a sql server login named wpc-ch10-user

Assign WPC-CH10-Database User db_owner permissions to the WPC-CH10-PQ database.

  Re-transmission or error correction

As you all know voice is fundamentally different from data. When a data packet is delayed, or corrupted, often the error is completely recoverable through re-transmission or error correction. What happens when a voice data packet is corrupted?

  Write appropriate hypotheses

Do these figures give evidence of a change in student attendance?

  What is the assigning security levels

Explain what is the Assigning security levels and why it is necessary for recordkeeping (e.g. what characteristics of records, recordkeeping systems or processes does it support?)

  What is the best-case performance of this algorithm

Consider the following implementation of an iterative merge sort. Scan the array from its beginning and partition it into segments that are each sorted.

  Run birch on each of the five different sortings

Run BIRCH on each of the five different sortings. Report the value of k and the MS for each.

  Discuss the advantages and disadvantages of dbmss

Discuss the advantages and disadvantages of DBMSs

  Describe the problem-solving steps for building a new system

Explain why the testing stage of systems development is so important. Name and describe the three stages of testing for an information system.

  Describe and rate three other web-based resources

You are an IT support person who needs to have a good set of tools for making operating system decisions rather quickly. In this hypothetical, pick the desktop operating system you are charged with supporting (Windows XP, WIndows NT, Windows 2000,..

  Use word processing software to create and format documents

Use word processing software to create and format documents

  What is the salt outlet temperature

The tube-wall will tolerate temperatures up to 600°C. Will the tubes survive start-up? What is the salt outlet temperature?

Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd