際際滷

際際滷Share a Scribd company logo
Applied physics III

Number systems: Arithmetic Operations

1
by Benson Mbuya
Review of basic concepts of arithmetic

2
Addition and subtraction of binary
numbers

3
Add the binary numbers 01010 and 10111

4
Subtract 111 from 10001

5
Hexadecimal Addition &
Subtraction
 Hexadecimal Addition

Carry generated
 Hexadecimal Subtraction

Borrow weight 16
Hexadecimal Addition
Carry 1
+

2AC6
92B5
BD7B

6+5=11d Bh
C+B=23d 17h
A+2+1=13d Dh
2+9=11d Bh
Hexadecimal Subtraction
Borrow
-

111
92B5
2AC6
67EF

21-6=15d Fh
26-C=14d Eh
17-A=7d 7h
8-2=6d 6h
Octal Addition & Subtraction
 Octal Addition

Carry generated
 Octal Subtraction

Borrow weight 8
Octal Addition
Carry 1
+

7602
5771
15573

2+1=3d 3O
0+7=7d 7O
6+7=13d 15O
1+7+5=13d 15O
Octal Subtraction
Borrow
-

11
7602
5771
1611

2-1=1d 1O
8-7=1d 1O
13-7=6d 6O
6-5=1d 1O
Addition and subtraction of hexadecimal numbers

12
13
14
Representing negative numbers in a
computer
 By convention the leftmost bit (or most
significant bit) is considered the sign bit.
 A value of 0 in the sign bit indicates a positive
number,
 whereas a 1 indicates a negative number.

15
examples

16
ONES COMPLEMENT

17
2s Complement

18
references
 Chapter 30, Teach yourself electronics, 3rd ed, Stan
Gibilisco.
 Chapter 4, digital electronics demystified, Myke Predko.
 Chapter 18, Schaums outline: basic mathematics with
applications to science and technology, Kruglak, Moore.
 http://www.electronics.dit.ie/staff/tscarff/number_syste
ms/number_systems.html
 http://active.tutsplus.com/tutorials/codingconcepts/number-systems-an-introduction-to-binaryhexadecimal-and-more/
 http://www.math.grin.edu/~rebelsky/Courses/152/97F/
Readings/student-binary
 http://active.tutsplus.com/tutorials/codingconcepts/number-systems-an-introduction-to-binary19
hexadecimal-and-more/

More Related Content

Applied physics iii lecture2 number_systemsii