alu.ppt
TRANSCRIPT
![Page 1: ALU.ppt](https://reader033.vdocuments.mx/reader033/viewer/2022061207/54857722b4af9f19248b4740/html5/thumbnails/1.jpg)
A . L . U
![Page 2: ALU.ppt](https://reader033.vdocuments.mx/reader033/viewer/2022061207/54857722b4af9f19248b4740/html5/thumbnails/2.jpg)
ALU (Arithmetic Logic Unit)
LA ALU ESTÁ FORMADA POR LOS SIGUIENTES ELEMENTOS:
1.Operadores2.Registros de entrada (REN) 3.Registro acumulador 4.Registro de estado (flags)
![Page 3: ALU.ppt](https://reader033.vdocuments.mx/reader033/viewer/2022061207/54857722b4af9f19248b4740/html5/thumbnails/3.jpg)
UNIDAD ARITMETICO LOGICA
• FUNCIÓN: Ejecutar las operaciones aritméticas y lógicas → OPERADORES
• Operadores o unidades funcionales:– Serie: operan bit tras bit– Paralelo: con todos los bit simultáneamente– Combinacionales– Secuenciales
• Registros: Acumulador; Otros registros (MC)
• Indicadores: S, Z , V, C
![Page 4: ALU.ppt](https://reader033.vdocuments.mx/reader033/viewer/2022061207/54857722b4af9f19248b4740/html5/thumbnails/4.jpg)
Esquema general
• REN 1 y
• REN 2 son
externos a la
ALU
BUS
![Page 5: ALU.ppt](https://reader033.vdocuments.mx/reader033/viewer/2022061207/54857722b4af9f19248b4740/html5/thumbnails/5.jpg)
A L U
• ESQUEMA BÁSICO
![Page 6: ALU.ppt](https://reader033.vdocuments.mx/reader033/viewer/2022061207/54857722b4af9f19248b4740/html5/thumbnails/6.jpg)
ALU CON ACUMULADOR
![Page 7: ALU.ppt](https://reader033.vdocuments.mx/reader033/viewer/2022061207/54857722b4af9f19248b4740/html5/thumbnails/7.jpg)
Estructura de una UAL básica
CONJUNTO DE OPERADORES
R. de estado
R. acumulador
![Page 8: ALU.ppt](https://reader033.vdocuments.mx/reader033/viewer/2022061207/54857722b4af9f19248b4740/html5/thumbnails/8.jpg)
OPERADORES
• OPERADORES LÓGICOS– En un operador combinacional– En un operador con acumulador
• OPERADORES ARITMÉTICOS– Operadores serie– Operadores paralelo
• Sumadores y sumadores/sustractores• Multiplicadores• Divisores
![Page 9: ALU.ppt](https://reader033.vdocuments.mx/reader033/viewer/2022061207/54857722b4af9f19248b4740/html5/thumbnails/9.jpg)
[ UAL ]
Präsentation
ABACUS
Ing. Gustavo Maurokefalidis 9 Arquitectura de Computadores
Unidad Aritmético Lógica Elemental
Con operadores puramente combinacionales
Operador con acumulador
![Page 10: ALU.ppt](https://reader033.vdocuments.mx/reader033/viewer/2022061207/54857722b4af9f19248b4740/html5/thumbnails/10.jpg)
[ UAL ]
Präsentation
ABACUS
Ing. Gustavo Maurokefalidis 10 Arquitectura de Computadores
OPERACIONES LOGICAS
Operadores Secuenciales
Elemento con operaciones Integradas
![Page 11: ALU.ppt](https://reader033.vdocuments.mx/reader033/viewer/2022061207/54857722b4af9f19248b4740/html5/thumbnails/11.jpg)
OPERADOR COMBINACIONAL
![Page 12: ALU.ppt](https://reader033.vdocuments.mx/reader033/viewer/2022061207/54857722b4af9f19248b4740/html5/thumbnails/12.jpg)
[ UAL ]
Präsentation
ABACUS
Ing. Gustavo Maurokefalidis 12 Arquitectura de Computadores
EL SEMISUMADOR
Entradas
Salidas
A B R S
0 0 0 0
0 1 0 1
1 0 0 1
1 1 1 0
½ Sumador½ Sumador AB
SR
![Page 13: ALU.ppt](https://reader033.vdocuments.mx/reader033/viewer/2022061207/54857722b4af9f19248b4740/html5/thumbnails/13.jpg)
[ UAL ]
Präsentation
ABACUS
Ing. Gustavo Maurokefalidis 13 Arquitectura de Computadores
EL SUMADOR
Entradas SalidasA B R' R S
0 0 0 0 0
0 1 0 0 1
1 0 0 0 1
1 1 0 1 0
0 0 1 0 1
0 1 1 1 0
1 0 1 1 0
1 1 1 1 1
De la tabla de verdad obtenemos las ecuaciones siguientes: S=-A.-B.R'+-A.B.-R'+A.-B.-R'+A.B.R'R=-A.B.R' + A.-B.R' +A.B.-R' + A.B.R' Se puede escribirse también: S=-R' . (-Á.B+A-B)+R' . (-A.-B+A.B) forma que corresponde a un OR exclusivo sobre las entradas A y B, si no hayarrastre, y al complemento de un OR exclusivo, si hay arrastre.R puede escribirse también: R=(-A.B.R'+A.B.R')+(A.-B.R'+A.B.R')+(A.B.-R'+A.B.R') de donde se desprende: R = (A + B) . R' + A.B el arrastre comporta dos términos: (1) R1 = A.B, que representa al arrastre generado en la etapa de sumador.
(2) R2 = (A+B). R' que representa al arrastre propagado por la etapa de sumador.
![Page 14: ALU.ppt](https://reader033.vdocuments.mx/reader033/viewer/2022061207/54857722b4af9f19248b4740/html5/thumbnails/14.jpg)
[ UAL ]
Präsentation
ABACUS
Ing. Gustavo Maurokefalidis 14 Arquitectura de Computadores
EL SUMADOR
Entradas SalidasA B R' R S
0 0 0 0 0
0 1 0 0 1
1 0 0 0 1
1 1 0 1 0
0 0 1 0 1
0 1 1 1 0
1 0 1 1 0
1 1 1 1 1
![Page 15: ALU.ppt](https://reader033.vdocuments.mx/reader033/viewer/2022061207/54857722b4af9f19248b4740/html5/thumbnails/15.jpg)
[ UAL ]
Präsentation
ABACUS
Ing. Gustavo Maurokefalidis 15 Arquitectura de Computadores
EL SUSTRACTOR
Entradas
Salidas
A B R D
0 0 0 0
0 1 1 1
1 0 0 1
1 1 0 0
½ Sustractor½ Sustractor AB
DR
A
B
D=AB
R=AxB
![Page 16: ALU.ppt](https://reader033.vdocuments.mx/reader033/viewer/2022061207/54857722b4af9f19248b4740/html5/thumbnails/16.jpg)
SUMADOR PARALELO
• PARA NUMEROS SIN SIGNO
![Page 17: ALU.ppt](https://reader033.vdocuments.mx/reader033/viewer/2022061207/54857722b4af9f19248b4740/html5/thumbnails/17.jpg)
[ UAL ][ UAL ]
Präsentation
ABACUS
Ing. Gustavo Maurokefalidis 17 Arquitectura de Computadores
Sumador Binario Paralelo
AC3AC3
B3B3
SUMSUM
AC2AC2
B2B2
SUMSUM
AC1AC1
B1B1
SUMSUM
AC0AC0
B0B0
½ SUM½ SUM
EACEAC
AB
R`RS
![Page 18: ALU.ppt](https://reader033.vdocuments.mx/reader033/viewer/2022061207/54857722b4af9f19248b4740/html5/thumbnails/18.jpg)
SUMADOR/SUSTRACTOR PARALELO
![Page 19: ALU.ppt](https://reader033.vdocuments.mx/reader033/viewer/2022061207/54857722b4af9f19248b4740/html5/thumbnails/19.jpg)
REPRESENTACIÓN DE LOS NÚMEROS EN LA MEMORIA
NUMEROS ENTEROS (positivos y negativos)
COMO ALMACENARLOS1. VERDADERA MAGNITUD: SE ALMACENA EL
NÚMERO EN SU FORMA BINARIA. SE CODIFICA EL SIGNO: - 1 ; + 0; Ejem.:
- 0011 1.0011 +1010 0.1010
2. COMPLEMENTO A 1: UNICAMENTE PARA NÚMEROS NEGATIVOS; Ejem: - 0111 1.1000
3. COMPLEMENTO A 2: TAMBIEN PARA NÙMEROS NEGATIVOS; Ejem: - 0111 1.1001
![Page 20: ALU.ppt](https://reader033.vdocuments.mx/reader033/viewer/2022061207/54857722b4af9f19248b4740/html5/thumbnails/20.jpg)
SUMADOR PARALELO
• COMO SE TRATA EL SIGNO
CONDICIÒN DE SIGNO
2 Op. > 0 (Res. +) 1 Op. > 0 y 1 Op. < 0No desbordamiento
2 Op. < 0 (Res -)
Repres. inicial 0 _ _ _ _ _0 _ _ _ _ _
1 _ _ _ _ _ 0 _ _ _ _ _
1 _ _ _ _ _ 1 _ _ _ _ _
Res. Si no hay arrastre de la etapa n-1
0 _ _ _ _ _Válido res. (+)
1 _ _ _ _ _Válido res. (-)
10 _ _ _ _ _No válido
Res. Si hay arrastre de la etapa n-1
1 _ _ _ _ _No Válido res. (-)desbordamiento
10 _ _ _ _ _Válido res. (+)
dejando de lado el desbordam.
11 _ _ _ _ _Válido res. (-)
dejando de lado el desbordam
![Page 21: ALU.ppt](https://reader033.vdocuments.mx/reader033/viewer/2022061207/54857722b4af9f19248b4740/html5/thumbnails/21.jpg)
[ UAL ][ UAL ]
Präsentation
ABACUS
Ing. Gustavo Maurokefalidis 21 Arquitectura de Computadores
Adición y Sustracción de Números Algebraicos Binarios
Condiciones de Signo:
2 operandos > 0 el resultado debe ser positivo
1 operando > 01 operando < 0No puede haber desbordamiento
2 operandos < 0El resultado debe ser negativo
![Page 22: ALU.ppt](https://reader033.vdocuments.mx/reader033/viewer/2022061207/54857722b4af9f19248b4740/html5/thumbnails/22.jpg)
SUMADOR DECIMALDec. BINARIO B C D Bin.
s’3 s’2 s’1 s’0 R s3 s2 s1 s0
10 1 0 1 0 1 0 0 0 0 16
11 1 0 1 1 1 0 0 0 1 17
12 1 1 0 0 1 0 0 1 0 18
13 1 1 0 1 1 0 0 1 1 19
14 1 1 1 0 1 0 1 0 0 20
15 1 1 1 1 1 0 1 0 1 21
16 1 0 0 0 0 1 0 1 1 0 22
17 1 0 0 0 1 1 0 1 1 1 23
18 1 0 0 1 0 1 1 0 0 0 24
SUMADOR DECIMAL
![Page 23: ALU.ppt](https://reader033.vdocuments.mx/reader033/viewer/2022061207/54857722b4af9f19248b4740/html5/thumbnails/23.jpg)
Corrección
CIRCUITO DE CORRECCIÓN
![Page 24: ALU.ppt](https://reader033.vdocuments.mx/reader033/viewer/2022061207/54857722b4af9f19248b4740/html5/thumbnails/24.jpg)
Circuito completo del sumador decimal
SUMADOR DE UNA DECADA
![Page 25: ALU.ppt](https://reader033.vdocuments.mx/reader033/viewer/2022061207/54857722b4af9f19248b4740/html5/thumbnails/25.jpg)
Solo NAND
SUMADOR BCD con dos CI 7483
![Page 26: ALU.ppt](https://reader033.vdocuments.mx/reader033/viewer/2022061207/54857722b4af9f19248b4740/html5/thumbnails/26.jpg)
ELEMENTO DE LA ALU (ABACUS)
![Page 27: ALU.ppt](https://reader033.vdocuments.mx/reader033/viewer/2022061207/54857722b4af9f19248b4740/html5/thumbnails/27.jpg)
![Page 28: ALU.ppt](https://reader033.vdocuments.mx/reader033/viewer/2022061207/54857722b4af9f19248b4740/html5/thumbnails/28.jpg)
MULTIPLICADORES• POR SUMA DESPLAZAMIENTO
– Justificación– Iniciación de la operación:
• Carga del multiplicador en Ac• Desplazamiento a der. del acum.+MC multiplicad.
en MC y ceros en Ac• Carga del multiplicando en B
– Ejecución de la operación– ¿Que queda en los registros?
• MULTIPLICADOR CELULAR
![Page 29: ALU.ppt](https://reader033.vdocuments.mx/reader033/viewer/2022061207/54857722b4af9f19248b4740/html5/thumbnails/29.jpg)
MULTIPLICADOR POR SUM./ DESPLAZ.
INICIALIZACIÓN DE LA OPERACIÓN
1) Carga del multiplicador en Ac
2) Desp. Der. De Ac + MC0 Ac y multiplicador en MC
3) Cargar multiplicando en B
![Page 30: ALU.ppt](https://reader033.vdocuments.mx/reader033/viewer/2022061207/54857722b4af9f19248b4740/html5/thumbnails/30.jpg)
Multiplicador por suma-desplazamiento
DIAGRAMA DE BLOQUES
![Page 31: ALU.ppt](https://reader033.vdocuments.mx/reader033/viewer/2022061207/54857722b4af9f19248b4740/html5/thumbnails/31.jpg)
MULTIPLICADOR CELULAR
![Page 32: ALU.ppt](https://reader033.vdocuments.mx/reader033/viewer/2022061207/54857722b4af9f19248b4740/html5/thumbnails/32.jpg)
DIVISIÓN POR SUSTRACCIÓN DESPLAZAMIENTO
• UTILIZANDO COMPARADOR– Justificación– Iniciación de la operación:
• Carga del dividendo en Ac• Desplazamiento a der. del (Ac).y (MC)
dividendo en MC y ceros en Ac• Carga del divisor en B
– Ejecución de la operación– ¿Que queda en los registros?
• DIVISIÓN CON RESTAURACIÓN
![Page 33: ALU.ppt](https://reader033.vdocuments.mx/reader033/viewer/2022061207/54857722b4af9f19248b4740/html5/thumbnails/33.jpg)
DIVISOR CON COMPARADOR
![Page 34: ALU.ppt](https://reader033.vdocuments.mx/reader033/viewer/2022061207/54857722b4af9f19248b4740/html5/thumbnails/34.jpg)
ORGANIGRAMA DEL DIVISOR CON COMPARADOR
![Page 35: ALU.ppt](https://reader033.vdocuments.mx/reader033/viewer/2022061207/54857722b4af9f19248b4740/html5/thumbnails/35.jpg)
ORGANIGRAMA DEL DIVISOR CON RESTAURACIÓN
![Page 37: ALU.ppt](https://reader033.vdocuments.mx/reader033/viewer/2022061207/54857722b4af9f19248b4740/html5/thumbnails/37.jpg)
OPERACIONES EN COMA FLOTANTE
• COMA FLOTANTE formato de números: SMxαE
• 125x106
0 3 1 2 5 0 0 0 0 9 1 2 5 0 0 0Coma a la derecha coma a la izquierda
S: 1 bit 1(-) ; 0(+)
E: e bits; como potencia de 2
M: m bits; si el número es negativo esta representado en compl. a 2
SUMA SUSTRACCION:
Primera fase: Alinear las mantisas
Segunda fase: Ajustar los signos
Tercera fase: Normalización de resultados
MULTIPLICACION Y DIVISION: No precisa operación preliminar de comparación de exponentes
S exponente (E) mantisa (M)
![Page 38: ALU.ppt](https://reader033.vdocuments.mx/reader033/viewer/2022061207/54857722b4af9f19248b4740/html5/thumbnails/38.jpg)
SUMA-SUSTRACCION EN COMA FLOTANTE
SUMADOR/
SUSTRACTOR
ExponentesMantisas 1ª fase
Alin mant Alin mant
Sum sust de mantisas
![Page 39: ALU.ppt](https://reader033.vdocuments.mx/reader033/viewer/2022061207/54857722b4af9f19248b4740/html5/thumbnails/39.jpg)
EJECUCIÓN DE LA SUMA
• FASES
1.Comparación de los exponentes
2.Alineamiento de las mantisas
3.Suma-sustracción de las mantisas
4.Normalización
![Page 40: ALU.ppt](https://reader033.vdocuments.mx/reader033/viewer/2022061207/54857722b4af9f19248b4740/html5/thumbnails/40.jpg)
![Page 41: ALU.ppt](https://reader033.vdocuments.mx/reader033/viewer/2022061207/54857722b4af9f19248b4740/html5/thumbnails/41.jpg)
EJERCICIOS1. Diseñe un circuito combinacional para obtener el complemento a 2 y el
complemento a 1, a partir del código binario de 4 variables.2. Obtener el diagrama lógico de un sumador completo de dos variables A y B,
usando sólo compuertas NAND.3. Diseñe un circuito lógico que genere el complemento a NUEVE de un número
en BCD de 4 bits. Utilice para tal fin el sumador completo de 4 bits 7483.4. Usando 4 compuertas XOR y un circuito MSI de sumadores completos de 4
bits (7483), construya un sumador-restador paralelo. Use una variable de selección de entrada Op, de tal manera que cuando Op=0 el circuito sumará y cuando Op=1 este restará. Ya saben como hacerlo ya que se vio en clases.
5. Diseñe un multiplicador binario que multiplique un número de 4 bits B=b3b2b1b0 por un número de 2 bits A=a1a0, para formar el producto C=c5c4c3c2c1c0. Esto puede lograrse mediante compuertas AND y sumadores paralelos de 4 bits.
6. Partiendo del código BCD de 4 bits, diseñe un circuito que genere el código EXCESO en 3, y el complemento a nueve de este último (por supuesto, también en exceso a 3) utilizando tecnología SSI y MSI.