668-0003-C Rabbit Semiconductor, 668-0003-C Datasheet - Page 34

no-image

668-0003-C

Manufacturer Part Number
668-0003-C
Description
IC CPU RABBIT2000 30MHZ 100PQFP
Manufacturer
Rabbit Semiconductor
Datasheet

Specifications of 668-0003-C

Rohs Status
RoHS non-compliant
Processor Type
Rabbit 2000 8-Bit
Speed
30MHz
Voltage
2.7V, 3V, 3.3V, 5V
Mounting Type
Surface Mount
Package / Case
100-MQFP, 100-PQFP
Features
-
Other names
316-1004
668-0003

Available stocks

Company
Part Number
Manufacturer
Quantity
Price
Part Number:
668-0003-C
Manufacturer:
Rabbit Semiconductor
Quantity:
10 000
The
The multiply instruction performs a signed multiply that generates a 32-bit signed result.
If a 16-bit by 16-bit multiply with a 16-bit result is performed, then only the low part of
the 32-bit result (
terms are signed or unsigned integers. The following method can be used to perform a 16
x 16 bit multiply of two unsigned integers and get an unsigned 32-bit result. This uses the
fact that if a negative number is multiplied the sign causes the other multiplier to be sub-
tracted from the product. The method shown below adds double the number subtracted so
that the effect is reversed and the sign bit is treated as a positive bit that causes an addition.
This method can be modified to multiply a signed number by an unsigned number. In that
case only the unsigned number has to be tested to see if the sign is on, and in that case the
signed number is added to the upper part of the product.
The multiply instruction can also be used to perform left or right shifts. A left shift of n
positions can be accomplished by multiplying by the unsigned number 2^^n. This works
for n # 15, and it doesn’t matter if the numbers are signed or unsigned. In order to do a
right shift by n (0 < n < 16), the number should be multiplied by the unsigned number
2^^(16 – n), and the upper part of the product taken. If the number is signed, then a signed
by unsigned multiply must be performed. If the number is unsigned or is to be treated as
unsigned for a logical right shift, then an unsigned by unsigned multiply must be per-
formed. The problem can be simplified by excluding the case where the multiplier is
2^^15.
28
SBC
LD A,l
rla
SBC A,a
LD h,a
MUL
LD BC,n1
LD HL',BC ; save BC in HL'
LD DE,n2
LD A,b
MUL
OR a
JR p,x1
ADD HL,DE ; adjust for negative sign in BC
x1:
RL DE
JR nc,x2
EX DE,HL'
ADD HL,DE
x2:
instruction can also be used to perform a sign extension.
; signed multiply of BC and DE,
; result in HL:BC - 1 byte, 12 clocks
; extend sign of l to HL
; sign to carry
; a is all 1’s if sign negative
; sign extended
BC
; save sign of BC
; form product in HL:BC
; test sign of BC multiplier
; if plus continue
; test sign of DE
; if not negative
; subtract other multiplier from HL
; final unsigned 32 bit result in HL:BC
) is used. This (counter intuitively) is the correct answer whether the
Rabbit 2000 Microprocessor User’s Manual

Related parts for 668-0003-C