Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

ECE 241 Home Work 1 Spring 2018 4) Write out the results of the following logical operations, assuming the variables are all int's (16-bit integers).

image text in transcribed
ECE 241 Home Work 1 Spring 2018 4) Write out the results of the following logical operations, assuming the variables are all int's (16-bit integers). Also assume that the variable "Port" is equal to 0x0055 at the start of each line. (5) A) Port &= 0xfff0; B) Port I= 15; // 15 is decimal. C) Port- Port 0x0005: D) Port = (( Port & ~ (0x800f) ) I 0:0020 ); Write the masking operation (similar in form to those in problem 4) that do the following masking operation. (5) Always remember the bit number starts with 0 5) bit numbering 15,14,13,12 11,10,9,8 7,6,5,4 3,2,1,0 A) Force bits 13 and 10 low Port A) Force bit 9 high Port- A) Toggle bit 11 Port A) Force bit 15 low and bit 1 high Port = (Port _0x___ ) _ 0x

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_2

Step: 3

blur-text-image_3

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

Database Driven Web Sites

Authors: Joline Morrison, Mike Morrison

2nd Edition

? 061906448X, 978-0619064488

More Books

Students also viewed these Databases questions

Question

friendliness and sincerity;

Answered: 1 week ago