# Question: A2 COMPUTING MODULE 4 AQA

Watch
This discussion is closed.
16 years ago
#1
Well i dont understand this question....
A Process can only Begin if bits 0 (least significant bit) and 4 of register are set to 1, and bits 2 and 3 are set to 0. The status of the other four bits has no effect on the process.

7 6 5 4 3 2 1 0
1 0 0 1

Write the key assembly language instructions to check whether the process can take place.
0
16 years ago
#2
The 1 should appear below the 4, followed by a 0 below the 3, followed by a 0 below the 2, the 1 should be blank, the 0 has 1 below it...the others are blank
0
16 years ago
#3
You need to use a mask of AND operation
then compare bits
0
16 years ago
#4
You need to use a mask of AND operation

What do u mean by MASK ???
0
16 years ago
#5
A mask is simply a sequence of bits used to read or set bits by applying logical (AND/OR) operations to the contents of a word.

e.g. a purely fictitious example:
00100101 is a byte given to you, you are asked to write instructions to ensure the output is ###1###1 (where # is irrelavant, it can be 1 or 0 - doesnt matter).

---------------

So if you were to use an OR operation:
Original number: 00100101
OR with: 00010001
It would ensure you get ###1###1, because whether bits 0 and 4 were 1 or 0, it would result in 1, because of the nature of the OR operation.

----------------

Using an AND operation allows you to do the opposite, and can ensure certain bits are set to 0. If and AND operation is carried out with 0, the result will always be a 0 (both bits need to be 1 in order for 1 to be the result). Using a 1, will only output in a 1 if the original bit is also 1. In the above example if you did an AND operation with 00010001, and used a CMP (compare) instruction with the pattern required you could branch it somewhere if it was equal (pattern is correct) or branch it elsewhere if they dont match.
0
X
new posts
Back
to top
Latest
My Feed

### Oops, nobody has postedin the last few hours.

Why not re-start the conversation?

see more

### See more of what you like onThe Student Room

You can personalise what you see on TSR. Tell us a little about yourself to get started.

### Poll

Join the discussion

#### If you're planning on going to uni this year, would any of these financial reasons stop you?

Not being able to work now to save up for uni (85)
14.1%
Reduced household income due to coronavirus means I can't afford to go (49)
8.13%
Lack of part-time jobs to support me while I'm at uni (75)
12.44%
Lack of graduate job prospects when I finish uni (67)
11.11%
Other reasons are stopping me going (79)
13.1%
Nothing is stopping me going (248)
41.13%