Instrucciones Aritméticas y Lógicas Flashcards

1
Q

Bandera C
Bandera Z
Bandera N

A

C-Carry
Z-Zero(ult operacion=0)
N-Negative(Ult operacion neg)

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

Bandera V
BANDRA S
BANDERA H

A

V-Overflow(resultados no cabe en destino)
S-Signo(signo de la ultima operacion N xor V)
H-Half Carry(generar carry de bit8 a 4)

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

Bandera T

Bandera I

A

T-Almacenamiento temporal de 1 bit

I-Habiltiacion de Interrupciones

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

ADD

Rd ← Rd + Rr

A

Sumar sin carry

Rd ← Rd + Rr

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

LDI R17, 0X77
LDI R18,0X43
ADD R17,R18

A

R17

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

ADC

A

Sumar cin carry

Rd ← Rd + Rr

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

LDI R15, 0X04
LDI R16,0X10
C

A

R15

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

ADIW

Rd+1:Rd ← Rd+1:Rd + K

A

d ∈ {24,26,28,30}

, 0 ≤ K ≤ 63

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

LDI R27, 0X02
LDI R26,0X0E
ADIW R26,0X20

A

0X020E
0X0020
0X022E

R27

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

SUB

Rd ← Rd - Rr

A

Restar sin carry

Rd ← Rd - Rr

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

LDI R17, 0X77
LDI R18,0X43
SUB R17,R18

A

R17

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

SUBI

Rd ← Rd - K

A

Resta registro y constante
SUBI Rd,K
16 ≤ d ≤ 31
0 ≤ K ≤ 255

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

LDI R18,0X43

SUBI R18,0X77

A

R18

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q

Bandera Z

A

Rd=Rr Z=1

Rd≠Rr Z=0

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
15
Q

Bandera C

A

Rd≥Rr o k C=0

Rd

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
16
Q

SBC

Rd ← Rd - Rr - C

A

Restar con carry
Rd ← Rd - Rr - C
0 ≤ d ≤ 31
0 ≤ r ≤ 31

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
17
Q

EJEMPLO SBC

C

A

R26

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
18
Q

SBCI

Rd ← Rd - K - C

A

Restar constante
16 ≤ d ≤ 31
0 ≤ K ≤ 255

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
19
Q

EJEMPLO SBCI
LDI R28, 0X13
SBCI R28,0X2
C

A

R28

20
Q

SBIW

A

Rd+1:Rd ← Rd+1:Rd - K
d ∈ {24,26,28,30}
0 ≤ K ≤ 63

21
Q

EJEMPLO SBIW
LDI R30,2B
LDI R31,0X20
SBIW R30,0X12

A

R31

22
Q

AND

Rd ← Rd • Rr

A

Entre dos registros
1100 AND 1011
1000

23
Q

ANDI

Rd ← Rd • K

A

Registro y constante
16 ≤ d ≤ 31
0 ≤ K ≤ 255

24
Q

OR
Rd ← Rd VRr
OR R17,R18

A

R17

25
Q

ORI

A

Registro y constante
16 ≤ d ≤ 31
0 ≤ K ≤ 255

26
Q

EOR

OR exclusivo

A

EOR Rd,Rr
0 ≤ d ≤ 31
0 ≤ r ≤ 3

27
Q

COM

A

Complemento a 1

28
Q

NEG

A

Complemento a 2

29
Q

SBR
Set bit in register
Rd ← Rd v K

A

16 ≤ d ≤ 31

0 ≤ K ≤ 255

30
Q

EJEMPLO SBR

SBR R18,0XAA

A

0 1 0 0 0 0 1 1
1 0 1 0 1 0 1 0
1 1 1 0 1 0 1 1
R18

31
Q

CBR
Clear bit in register
Rd ← Rd • ($FF - K)

A

16 ≤ d ≤ 31

0 ≤ K ≤ 255

32
Q

EJEMPLO CBR

A

0 1 0 0 0 0 1 1
1 0 1 0 1 0 1 0
0 1 0 0 0 0 0 1
R18

33
Q

INC

A

Incrementar

34
Q

DEC

A

Decrementar

35
Q

TST

Rd ← Rd • Rd

A

mueve banderas z y n

36
Q

EJEMPLO TST

A

R29

37
Q

CLR

A

limpia registro
CLR R16
R16<0X00

38
Q

SER

A

set registro
SER R16
R16<0XFF

39
Q

MUL

A

R1:R0 ← Rd × Rr (unsigned ← unsigned × unsigned)

40
Q

LDI R2,0x14
LDI R28,0X13
MUL R2,R28

A

R1< -0X01

R0

41
Q

MULS

A

R1:R0 ← Rd × Rr (signed ← signed × signed)
16 ≤ d ≤ 31
16 ≤ r ≤ 31

42
Q

MULS R2,R28

A

NO VÁLIDO

43
Q

MULSU

A

R1:R0 ← Rd × Rr (signed ← signed × unsigned)
16 ≤ d ≤ 23
16 ≤ r ≤ 23

44
Q

MULSU R2,R28

A

NO VÁLIDO

45
Q

FMUL

R1:R0 ← Rd × Rr (unsigned (1.15) ← unsigned (1.7) × unsigned (1.7))

A

Multiplicacion en fraccionarios
16 ≤ d ≤ 23
16 ≤ r ≤ 23