Professional Documents
Culture Documents
Chapter 1
Digital Systems and Information
Mutah University
Faculty of IT, Department of Software Engineering
Dr. Ra’Fat A. AL-msie’deen
Course Info
(Figure) Examples
of Voltage Ranges
and Waveforms for
Binary Signals.
Information is represented using signals.
𝑛−1 −1
– Value = 𝑖=0 𝐴𝑖 𝑟𝑖 + 𝑗=−𝑚 𝐴𝑗 𝑟𝑗
– Example : (7563.1102)8 = ( ? )2
– Solution: (111 101 110 011 . 001 001 000 010)2
Conversion between Numbering Systems (Cont.)
• (D041.32)16 = ( 150101.144 )8
Inputs Outputs
A B Borrow Difference
0 0 0 0
0 1 1 1
1 0 0 1
1 1 0 0
Recall that, in the event that the subtrahend is larger than the
minuend, we subtract the minuend from the subtrahend and
give the result a minus sign.
This is the case in the third example, in which this interchange
of the two operands is shown.
1 1 1 1 1
Arithmetic Operations (Cont.) X 1 0 1 0 1 0 0
Y 0 1 1 1 1 0 1
Subtraction with Complements
1 0 0 1 0 0 0 1
– The complement operation dictates that if
Discard end carry 27
x= 1, then 𝑥 = 0.
Answer: X - Y =
– Example: Given the two binary numbers X
= 1010100 and Y = 1000011, perform 0 0 1 0 0 0 1
the subtraction x 1 0 1 0 1 0 0
(a) X - Y 𝑥 0 1 0 1 0 1 1
(b) Y - X by using 2’s complements. + 1
• 1’s complement of Y “1000011” is 2’s complement =
“0111100”.
0 1 0 1 1 0 0
• 2’s complement of Y “0111100” is
0111100 + 1 = 0111101.
Y 1 0 0 0 0 1 1
27 26 25 24 23 22 21 20 X 0 1 0 1 1 0 0
128 64 32 16 8 4 2 1 1 1 0 1 1 1 1
x 1 0 1 0 1 0 0 84 There is no end carry.
y 1 0 0 0 0 1 1 67 - 0 0 1 0 0 0 1
Arithmetic Operations (Cont.)
(Table)
Binary-
Coded
Decimal
(BCD):
American Standard Code for Information
Interchange (ASCII)
Non-numeric code.
Uses 7 bits for encoding → 27 = 128 characters (items)
classified into:
– Printable characters:
• which includes the 10 decimal digits, the 26 uppercase
letters, the 26 lowercase letters, and 32 special
characters such as (, # @ ; .)
– Non-printable control characters: such as NULL, space,
carriage return, delete.
– Note: (2)ASCII + (3)ASCII ≠ (5)ASCII
Unicode
Non-numeric code.
Uses 16 bits for encoding → 216 = 64 K characters (64*1024).
Gray Code
Non-numeric code.
There is only one bit change between
adjacent codes.
For example, in order to encode the
colors (red, yellow, blue, green) using
gray codes, the codes will be assigned
to the colors as follows:
– Red: 00
– Yellow: 01
– Blue: 11
– Green: 10
The following table shows the binary
code and gray code as we count from
000 to 111 and the number of bits
changing between adjacent codes for
each code.
Parity Code
Non-numeric code.
Extra bit(s) added to the original data to aid error detection.
In case of a single parity bit, an additional bit is added make
the total number of 1s in the resulting code either even or
odd.
The following table shows an example of forming even and
odd parity. In each case, the extra parity bit is added in the
most significant position of the code.
Parity Code (Cont.)
Chapter 1
Digital Systems and Information
Mutah University
Faculty of IT, Department of Software Engineering
Dr. Ra’Fat A. AL-msie’deen