12.07.2015 Views

80C186EB/80C188EB Microprocessor User's Manual - CEUNES

80C186EB/80C188EB Microprocessor User's Manual - CEUNES

80C186EB/80C188EB Microprocessor User's Manual - CEUNES

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

OVERVIEW OF THE 80C186 FAMILY ARCHITECTURETable 2-5. Arithmetic Interpretation of 8-Bit NumbersHexBit PatternUnsignedBinarySignedBinaryUnpackedDecimalPackedDecimal07 0 0 0 0 0 1 1 1 7 +7 7 789 1 0 0 0 1 0 0 1 137 –119 invalid 89C5 1 1 0 0 0 1 0 1 197 –59 invalid invalid2.2.1.3 Bit Manipulation InstructionsThere are three groups of instructions for manipulating bits within bytes and words. These threegroups are logical, shifts and rotates. Table 2-6 lists the bit manipulation instructions and theirfunctions.Table 2-6. Bit Manipulation InstructionsLogicalsNOTANDORXORTEST“Not” byte or word“And” byte or word“Inclusive or” byte or word“Exclusive or” byte or word“Test” byte or wordShiftsSHL/SALSHRSARShift logical/arithmetic left byte or wordShift logical right byte or wordShift arithmetic right byte or wordRotatesROLRORRCLRCRRotate left byte or wordRotate right byte or wordRotate through carry left byte or wordRotate through carry right byte or wordLogical instructions include the Boolean operators NOT, AND, OR and exclusive OR (XOR), aswell as a TEST instruction. The TEST instruction sets the flags as a result of a Boolean AND operationbut does not alter either of its operands.Individual bits in bytes and words can be shifted either arithmetically or logically. Up to 32 shiftscan be performed, according to the value of the count operand coded in the instruction. The countcan be specified as an immediate value or as a variable in the CL register. This allows the shiftcount to be a supplied at execution time. Arithmetic shifts can be used to multiply and divide binarynumbers by powers of two. Logical shifts can be used to isolate bits in bytes or words.2-21

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!