Question

In: Electrical Engineering

1) For x ¼ "110010", of type BIT_VECTOR(5 DOWNTO 0), determine the values of the shift...

1) For x ¼ "110010", of type BIT_VECTOR(5 DOWNTO 0), determine the values of the
shift operations listed in the column on the left below.
2) In the column on the right, write an equivalent expression using the concatenation
operator (the first one was already done).
a) x SLL 3
b) x SLA -2
c) x SRA 2
d) x ROL 1
e) x ROR -3
a) x(2 DOWNTO 0) & "000"
b)
c)
d)
e)

Solutions

Expert Solution

The question is about shift operations in VHDL. In VHDL the shift registers are defined only for one-dimensional arrays of bit or boolean. There are a total of 6 shift operators in VHDL. Among them, in this question, we have to deal with 5 of the VHDL shift operators.

SLL= Shift Left Logical

SLA= Shift Left Arithmetic

SRA= Shift Right Arithmetic

ROL= Rotate Left Logical

ROR= Rotate Right Logical

(a) x SLL 3 = 3 LSB bits (010) + 000 = x(2 DOWNTO 0) & '000'

(b) x SLA -2 = x SRA 2 = vector x is shifted to the rigth by 2 bits and the MSB bit is replicated twice

= 11 & 1100 = "11" & x( 5 DOWNTO 2)

(c) x SRA 2 = vector x is shifted to the rigth by 2 bits and the MSB bit is replicated twice

= 11 & 1100 = "11" & x( 5 DOWNTO 2)

(d) x ROL 1 = vector x is rotated to the left by 1 bit = 011001 = x(0) & x(5 DOWNTO 1)

(e) x ROR -3 = x ROL 3 = vector x is rotated to the left by 3 bits

= 010110 = x(0 TO 2) & x(5 DOWNTO 3)


Related Solutions

The random variable X can take on the values -5, 0, and 5, and the random...
The random variable X can take on the values -5, 0, and 5, and the random variable Y can take on the values 20, 25, and 30. The joint probability distribution of X and Y is given in the following table: Y 20 25 30 X -5 0.15 0.02 0.06 0 0.08 0.05 0.05 5 0.32 0.10 0.17 a. Describe in words and notation the event that has probability 0.17 in the table. . b. Calculate the marginal distribution of...
Solve the system below having the initial values x(0) = 1 = y(0) x’ = x...
Solve the system below having the initial values x(0) = 1 = y(0) x’ = x + 2y y’ = -5x + 3y Please use solving systems of linear des by elimination. Thank You
Ex 3.41 Suppose X takes on the values −2,−1, 0, 1, 2 with probability 1/5 each,...
Ex 3.41 Suppose X takes on the values −2,−1, 0, 1, 2 with probability 1/5 each, and let Y = X^^2. (a) Find Cov (X, Y). (b) Prove X and Y are independent and explain your steps.
For f(x,y)=cxy, ? ≥ 0, ? ≥ 0, ? + ? ≤ 1, Determine E(Y|x) and...
For f(x,y)=cxy, ? ≥ 0, ? ≥ 0, ? + ? ≤ 1, Determine E(Y|x) and E(X|y)
A company uses a ranking system of values from 0 to 5 to determine pay raise...
A company uses a ranking system of values from 0 to 5 to determine pay raise percentage and new salary for employees. Create the code for a python application that prompts the user for the annual performance ranking for an employee and their current salary.   Your code should use the annual performance ranking to determine the pay raise percentage based on the table below, then calculate the new annual salary ( salary + raise) in dollars. Assume rankings are only...
Given a difference equation x[n+2] + 5x[n+1]+6x[n]=n with start values x[0]= 0 and x[1]=0
Given a difference equation x[n+2] + 5x[n+1]+6x[n]=n with start values x[0]= 0 and x[1]=0
If X follows a binomial(5, 0.15), determine (a) P(X = 0). (b) P(X ≤ 4). (c)...
If X follows a binomial(5, 0.15), determine (a) P(X = 0). (b) P(X ≤ 4). (c) P(X > 1).
x (Bins) frequency 0 0 1 0 2 0 3 2 4 5 5 8 6...
x (Bins) frequency 0 0 1 0 2 0 3 2 4 5 5 8 6 13 7 33 8 42 9 66 10 77 11 105 12 103 13 110 14 105 15 84 16 70 17 51 18 40 19 27 20 27 21 15 22 5 23 7 24 2 25 2 26 1 27 0 28 0 29 0 30 0 (7) On the Histogram worksheet, calculate all frequencies of the distribution using the table shown....
given DE has a regular singular point at x=0 determine two solutions for x>0 x^2y''+3xy'+(1+x)y=0
given DE has a regular singular point at x=0 determine two solutions for x>0 x^2y''+3xy'+(1+x)y=0
Determine the location and value of the absolute extreme values of: f(x) = sin (1 /x...
Determine the location and value of the absolute extreme values of: f(x) = sin (1 /x ) on [ 1/5 , 2].
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT