CoENG001L Midterm Lecture 2 Number Systems Conversions and Arithmetic and Complement
CoENG001L Midterm Lecture 2 Number Systems Conversions and Arithmetic and Complement
and Arithmetic
CoENG001L
Midterm Lecture 2
by: Engr. Ricrey E. Marquez, CpE, MSCS
After this lecture, student should be able:
Lecture Objectives
Base or radix – the number of digits (basic symbols) in a
manner system
Bit – an abbreviation for binary numbers
Byte – a string of 8 bits and it is the basic unit of binary
information
Chunking - a process of replacing a longer string of binary
numbers by a shorter one
Data – refers to a names, numbers, and any other
information needed to solve a problem
Digital – pertains to anything in the form of digits.
Double Word – a string of 32 bits or 4 bytes
Nibble – a string of 4 bits or half a byte
Quad Word - a string of 64 bits or 8 bytes
String – a group of digits or symbols
Word – a string of 16 bits or 2 bytes
Terms to Remember
Number Systems Conversions and Arithmetic
These are given in a notation of Nr or Nb; where
N is the numerical value of the number system,
and r/b is radix/base of the number system.
Radix/ Radix/
Number System Number System
Base Base
Binary 2 Decimal 10
Ternary 3 Undinary 11
Quarternary 4 Duodenary 12
Quinary 5 Trendary 13
Senary 6 Quatrodinary 14
Sepnary 7 Quindinary 15
Octal 8 Hexadecimal 16
Nonary 9
Number System Conversions
Number Systems Conversions and Arithmetic
C1- Conversion from decimal to any
number system
◦ Examples:
a) 1237.8125 N11
b) 2679.1436 N5
c) 7615.1234 N15
a) 2A56.1313 N10
b) ECE3.BE16 N10
c) EAC0.ACE15 N10
◦ Examples:
a) 2A56.1311 N6
b) B234.AC13 N14
c) ABCD.EB15 N9
Complements
Number Systems Conversions and Arithmetic
r’s Complements
◦ where:
r’s Complements
Number Systems Conversions and Arithmetic
(r-1)’s Complements
◦ (r-1)’s of N = rn – r–m - N,
◦ where:
(r-1)’s Complements
Number Systems Conversions and Arithmetic
Examples:
Complements
Number Systems Conversions and Arithmetic
Subtractionof two positive numbers
(M - N), both base r, may done as
follows: