Sign in

username:

password:



Not a member?

Search hc11



Search tips

Subscribe to hc11



Ads

Discussion Groups

Discussion Groups | M68HC11 | Need Some help with this!!!!!

Technical discussions about Freescale Microcontrollers: M68HC11. (Freescale Semiconductor is a Subsidiary of Motorola).

Need Some help with this!!!!! - aznxstryder - Oct 12 0:14:00 2004


Cant seem to figure it out..
tryin to write a program that does a 8 by 8 bit SIGNED multiplication.
s0 basicallym implementing the 2's compliment






(You need to be a member of hc11 -- send a blank email to hc11-subscribe@yahoogroups.com )


Re: Need Some help with this!!!!! - Tony Papadimitriou - Oct 12 5:56:00 2004

This sounds like homework, so I won't code it for you but I'll tell you the
basic steps.

1. XOR the two signs together and you've got the sign of the result.
2. Convert either negative number to positive (there's an instruction for the
two's complement at the assembly language level).
3. Multiply the two, now positive, numbers.
4. If the sign of the result in step [1] was negative, get the two's complement
of the result in step [3].
----- Original Message -----
From: "aznxstryder" <>
To: <>
Sent: Tuesday, October 12, 2004 8:14 AM
Subject: [m68HC11] Need Some help with this!!!!! >
> Cant seem to figure it out..
> tryin to write a program that does a 8 by 8 bit SIGNED multiplication.
> s0 basicallym implementing the 2's compliment




(You need to be a member of hc11 -- send a blank email to hc11-subscribe@yahoogroups.com )