Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Question 1 The bit masking technique is often used to check whether one or more particular bits in a data string are OFF. Answer the

Question 1
The bit masking technique is often used to check whether one or more particular bits in a data
string are OFF. Answer the following questions correctly.
(a) Explain how the bit masking technique is executed. Give an example in your
explanation.
(10 marks)
(b) A block of byte long data residing in between and including the consecutive addresses
$1000 to $4FFF are to be used to turn on two LEDs that are individually connected to
two separate output ports of a system designed around the 68000 microprocessor.
Each data byte has a logic '1' for bit 7 and bit 0 to turn on the LEDs. However, it is
known that only bits 7 and 0 of all of the byte long data set in the memory block is
corrupted. Write an assembly language program for the 68k that checks the values of
bits 7 and 0 of each data byte residing in the memory block in question. The program
must change the value of bit 7 and 0 to '1' if they are '0', resulting in a new data value
that must be restored back at same address position. On the other hand, if bits 7 and 0
are already ' I ', the data byte should be retained. The program must also indicate the
number of bit 7 and 0 that has been corrected from the data block. The BTST instruction
may not be used in your program.
image text in transcribed

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

Oracle Database 10g Insider Solutions

Authors: Arun R. Kumar, John Kanagaraj, Richard Stroupe

1st Edition

0672327910, 978-0672327919

More Books

Students also viewed these Databases questions