Question: 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!
 I am trying to create a datapath using purely combinational logic.

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); 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

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!