BINARY ARITHMETIC SUMMARY - PowerPoint PPT Presentation

1 / 44
About This Presentation
Title:

BINARY ARITHMETIC SUMMARY

Description:

n = number of bits in register. Two's complement: -A = not(A) 1 ... EXAMPLE (4 bits) EXAMPLE (4 bits) V C C. 0 1 1 1 (7) 0 1 1 1 (7) 0 0 1 0 (2) 0 0 1 0 (2) ... – PowerPoint PPT presentation

Number of Views:32
Avg rating:3.0/5.0
Slides: 45
Provided by: ACT148
Category:

less

Transcript and Presenter's Notes

Title: BINARY ARITHMETIC SUMMARY


1
(No Transcript)
2
(No Transcript)
3
(No Transcript)
4
(No Transcript)
5
(No Transcript)
6
(No Transcript)
7
(No Transcript)
8
(No Transcript)
9
(No Transcript)
10
(No Transcript)
11
(No Transcript)
12
(No Transcript)
13
(No Transcript)
14
(No Transcript)
15
(No Transcript)
16
(No Transcript)
17
(No Transcript)
18
(No Transcript)
19
(No Transcript)
20
(No Transcript)
21
BINARY ARITHMETIC SUMMARY SIGNED UNSIGN
ED Range -(2(n-1), 2(n-1)
1 Range 0, (2n) 1 n number of bits
in register Two's complement -A not(A)
1 Conditional bits Z, N, C, V Conditional
bits Z, C Overflow (V bit) Overflow (C
bit) Sign (A) Sign (B) ! Sign (Result) - gt V
1 C MS bit 1 EXAMPLE (4 bits) EXAMPLE
(4 bits) V C C 0 1 1 1 (7) 0 1 1 1
(7) 0 0 1 0 (2) 0 0 1 0
(2) -------- --------- 1 0 1 0 0 1 (-7,
9) 0 1 0 0 1 (9) ----------------------------
---------------------------------- -------------
------------------------------------ 1 1 1 1
(-1) 1 0 1 0 (10) 1 0 0 0 (-8) 0 1 1 1
(7) --------- ---------- 1 1 0 1 1 1 (7,
-9) 1 0 0 0 1 (1, 17)
22
(No Transcript)
23
(No Transcript)
24
(No Transcript)
25
(No Transcript)
26
  • SIGNED NUMBER BRANCH CONDITIONS
  • BL- Branch on less (N xor V) 1
  • N V N xor V
  • 0 0 0
  • 0 1 1
  • 1 0 1
  • 1 1 0
  • I CMP (8, 2) 0 1 0 0 0 (8)
  • 1 1 1 1 0 (-2)
  • V C -----------
  • 0 1 0 1 1 1 0
  • V 0, N 0 -gt N xor V 0
  • II CMP (-8, 2) 1 0 0 0 0 (-8)
  • 1 1 1 1 0 (-2)
  • V C -----------
  • 1 1 0 1 1 1 0

27
  • SIGNED NUMBER BRANCH CONDITIONS CONT.
  • BG- Branch on greater Z or (N xor V) 0
  • N V N xor V Z Z or (N xor V)
  • 0 0 0 0 0
  • 0 1 1 1 1
  • 1 0 1 0 1
  • 1 1 0 1 1
  • I CMP (8, 2) 0 1 0 0 0 (8)
  • 1 1 1 1 0 (-2)
  • V C -----------
  • 0 1 0 1 1 1 0
  • Z 0, V 0, N 0 -gt Z or (N xor V) 0
  • II CMP (-8, 2) 1 0 0 0 0 (-8)
  • 1 1 1 1 0 (-2)
  • V C -----------
  • 1 1 0 1 1 1 0

28
(No Transcript)
29
(No Transcript)
30
(No Transcript)
31
(No Transcript)
32
(No Transcript)
33
(No Transcript)
34
(No Transcript)
35
(No Transcript)
36
(No Transcript)
37
(No Transcript)
38
(No Transcript)
39
(No Transcript)
40
(No Transcript)
41
(No Transcript)
42
(No Transcript)
43
(No Transcript)
44
(No Transcript)
Write a Comment
User Comments (0)
About PowerShow.com