• Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

...

Status
Not open for further replies.

erkanz55

New Member
Write a program segment (at most two instructions) to clear the carry bit if Accumulator A contains an odd number, otherwise set the carry bit. The contents of AccA may be modified.
 

Pommie

Well-Known Member
Most Helpful Member
Is there an instruction something like rotate right through carry. If so then xor 1 (or subtract 1) followed by the rotate will be the two instructions.

Mike.
Edit, a look at the instruction set should give you the code you need.
 
Last edited:

erkanz55

New Member
Is there an instruction something like rotate right through carry. If so then xor 1 (or subtract 1) followed by the rotate will be the two instructions.

Mike.
Edit, a look at the instruction set should give you the code you need.
thanks for help
I looked at the instruction set many times but still can't write the code.
 

JimB

Super Moderator
Most Helpful Member
Another tip,

do you know the easy way to tell if a binary number is odd or even?

JimB
 

JimB

Super Moderator
Most Helpful Member
Looks like someone has thrown his toys out of the cot.

Thread closed.

JimB
 
Status
Not open for further replies.

Similar threads

Replies
8
Views
504
Replies
2
Views
303

Latest threads

EE World Online Articles

Loading

 
Top