Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

I am trying to create a datapath using purely combinational logic. Trying to implement this C program. I was thinking of creating three registers ,

I am trying to create a datapath using purely combinational logic. Trying to implement this C program. I was thinking of creating three registers , namely X, Y and Z. I initialize x and y to constants of 0, then I make register Z an active low register. I send a constant 0 to the input line of that register, and not the input. So it sends a 1 to the Write and Read Enable of th register so it doesnt function when its high. Im a bit confused on how to implement the rest of the code. Any ideas (even altering what Ive thought about) is welcome! Thank you!
image text in transcribed
void main(X int x, y, z; r=0; y=0; scanf("input z: %d", &z); while (2+0){ if ((z%2) == 1) x=x+4; else y=y+2; z=21; printf("value X = %d, value y = %d", x, y)

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Data Management Databases And Organizations

Authors: Richard T. Watson

2nd Edition

0471180742, 978-0471180746

More Books

Students also viewed these Databases questions