Electronic Components Datasheet Search
  English  ▼

X  

D17133CS Datasheet(PDF) 111 Page - NEC

Part # D17133CS
Description  4-BIT SINGLE-CHIP MICROCONTROLLER
PDF  289 Pages
Scroll/Zoom Zoom In 100%  Zoom Out
Manufacturer  NEC [NEC]
Direct Link  http://www.nec.com/
Logo NEC - NEC

D17133CS Datasheet(HTML) 111 Page - NEC

Back Button D17133CS Datasheet HTML 107Page - NEC D17133CS Datasheet HTML 108Page - NEC D17133CS Datasheet HTML 109Page - NEC D17133CS Datasheet HTML 110Page - NEC D17133CS Datasheet HTML 111Page - NEC D17133CS Datasheet HTML 112Page - NEC D17133CS Datasheet HTML 113Page - NEC D17133CS Datasheet HTML 114Page - NEC D17133CS Datasheet HTML 115Page - NEC Next Button
Zoom Inzoom in Zoom Outzoom out
 111 / 289 page
background image
CHAPTER 11
ARITHMETIC AND LOGIC UNIT
96
11.3.4 Addition and Subtraction When CMP=1 and BCD=1
BCD operations are performed.
The result is not stored in either the general register or data memory.
In other words, the operations specified by CMP=1 and BCD=1 are both performed at the same time.
Example
MOV
RPL, #0001B
; Sets the BCD flag (BCD=1).
MOV
PSW, #1010B
; Sets the CMP and Z flag (CMP=1, Z=1) and resets the CY flag
; (CY=0).
SUB
M1, #0001B
; <1>
SUBC
M2, #0010B
; <2>
SUBC
M3, #0011B
; <3>
By executing the instructions in steps numbered <1>, <2>, and <3>, the twelve bits in memory
locations M1, M2, and M3 and the immediate data (321) can be compared in decimal.
11.3.5 Cautions on Use of Arithmetic Operations
When performing arithmetic operations with the program status word (PSWORD), caution should be taken with
regard to the result of the operation being stored in the program status word.
Normally, the CY and Z flags in the program status word are set (1) or reset (0) according to the result of the
arithmetic operation being executed. However, when an arithmetic operation is performed on the program status
word itself, the result is stored in the program status word. This means that there is no way to determine if there
is a carry or borrow in the result of the operation nor if the result of the operation is zero.
However, when the CMP flag is set (1), results of arithmetic operations are not stored. Therefore, even in the
above case, the CY and Z flags will be properly set (1) or reset (0) according to the result of the operation.
11.4 LOGICAL OPERATIONS
As shown in Table 11-4, logical operations consist of logical OR, logical AND, and logical XOR. Accordingly, the
logical operation instructions are OR, AND, and XOR.
The OR, AND, and XOR instructions can be performed on either the general register and data memory, or on data
memory and immediate data. The operands of these instructions are specified in the same way as for arithmetic
operations ("r, m" or "m, #n4").
Logical operations are not affected by the BCD or CMP flags in the program status word (PSWORD). Logical
operations do not cause either the CY or Z flag in the program status word (PSWORD) to be set. However, when
the index enable flag (IXE) is set (1), index modification is performed using the index register.



Html Pages

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100  ...More


Datasheet Download

Go To PDF Page


Link URL



Does ALLDATASHEET help your business so far?  [ DONATE ] 

About Alldatasheet   |   Advertisement   |   Contact us   |   Privacy Policy   |   Link to Datasheet    |   Link Exchange   |   Manufacturer List
All Rights Reserved©Alldatasheet.com


Mirror Sites
English : Alldatasheet.com  |   English : Alldatasheet.net  |   Chinese : Alldatasheetcn.com  |   German : Alldatasheetde.com  |   Japanese : Alldatasheet.jp
Russian : Alldatasheetru.com  |   Korean : Alldatasheet.co.kr  |   Spanish : Alldatasheet.es  |   French : Alldatasheet.fr  |   Italian : Alldatasheetit.com
Portuguese : Alldatasheetpt.com  |   Polish : Alldatasheet.pl  |   Vietnamese : Alldatasheet.vn
Indian : Alldatasheet.in  |   Mexican : Alldatasheet.com.mx  |   British : Alldatasheet.co.uk  |   New Zealand : Alldatasheet.co.nz
Family Site : ic2ic.com  |   icmetro.com