Answered step by step
Verified Expert Solution
Question
1 Approved Answer
b. Determine the value of p, q, r, s, x and y after execution of the following VHDL program. (12 Marks) library ieee; use ieee.std_logic_1164.all;
b. Determine the value of p, q, r, s, x and y after execution of the following VHDL program.
(12 Marks)
library ieee;
use ieee.std_logic_1164.all;
entity shift_operators is
port (a: in bit_vector(7 downto 0); p,q,r,s: out bit_vector(7 downto 0); b,c: in integer range -7 to 7; x,y: out integer range -7 to 7);
end shift_operators;
Architecture ex of shift_operators is
begin
a<= 10010010;
b<= 7;
c<=-4;
p<= a rol 2;
q<= a srl -3;
r<= a srl 2;
s<= a sla 3;
x<= b mod c;
y<= b rem c;
end ex;
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started