Answered step by step
Verified Expert Solution
Link Copied!

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

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

Intelligent Databases Object Oriented Deductive Hypermedia Technologies

Authors: Kamran Parsaye, Mark Chignell, Setrag Khoshafian, Harry Wong

1st Edition

0471503452, 978-0471503453

More Books

Students also viewed these Databases questions

Question

Describe the steps involved in coaching to improve poor performance

Answered: 1 week ago