Continue to Site

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.

  • 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.
 
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:
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.
 
Another tip,

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

JimB
 
Looks like someone has thrown his toys out of the cot.

Thread closed.

JimB
 
Status
Not open for further replies.

Similar threads

Latest threads

New Articles From Microcontroller Tips

Back
Top