Cfs10bt Number Systems Notes PDF
Cfs10bt Number Systems Notes PDF
Cfs10bt Number Systems Notes PDF
SEMESTER 1
2019
NUMBER SYSTEMS and BINARY LOGIC
COURSE NAME: NATIONAL DIPLOMA:
FOUNDATION IT
INFORMATION TECHNOLOGY
B TECH FINANCIAL INFORMATION SYSTEMS
1. Introduction
A computer is based on the most basic beginnings of 2 electronic states. The electronic circuits
of a computer can only be in one of two states: ‘on’ or ‘off’. A bit (binary digit) represents these
two states. There are therefore two values which a bit or binary digit can be, namely 0 and 1.
One could say that strings of ones and zeros are the mother tongue of the computer!
2. Grouping of bits
Computer manufacturers use a grouping of bits to represent letters, figures and special
characters such as ? or +. A group of eight bits is called a byte.
A computer word is the number of bits that can be handled as a unit. The word length of
computers differs. In modern computers it is normally 32 or 64 bits.
3. Number systems
There are different number systems. The number system that is familiar to us is called the
decimal number system.
The decimal number system uses ten symbols (0, 1, 2, 3, 4, 5, 6, 7, 8, and 9) to represent
numbers. The decimal number system therefore has a base of 10.
The place of the figure determines its value. This concept is the same for all number systems.
The place values of the decimal number system are shown in the following table.
Power 103 102 101 100 10-1 10-2 10-3
Place value 1000 100 10 1 0,1 0,01 0,001
Example of number 5 3 4 7 , 2 3 1
3.2 Expanded notation
By multiplying numbers with their place values, you can write numbers in expanded notation.
Examples:
5347,23110 = 5x103 + 3x102 + 4x101 + 7x100 + 2x10-1 + 3x10-2 + 1x10-3
702,0710 = 7x102 + 0x101 + 2x100 + 0x10-1 + 7x10-2
Take note: Since we are working with different number systems you must include the
base to ensure that everybody knows in which number system you are
working. If you do not include the base, marks will be deducted in this module.
Take note: The methods used in this module and these notes, will be the only methods
that will be marked. Indicate all steps to get full marks!
You can test your answer by using the place value. Therefore, for Example 4 you can test
your answer as follows:
Step 1: Write down the place values of the binary number system. It is only necessary to
write down the place values smaller or equal to 510 and bigger or equal to
0,62510
Step 2: Start at the left-hand side of the decimal comma, and determine from left to right
what combination of place values make up the number 510
Place values 4 2 1
Number 1 0 1
1 + 4 = 510
Step 3: Start at the decimal comma and determine from right to left what combination of
place values make up the fraction 0,62510
Exercise
1. Convert the following binary numbers to decimal numbers.
2 90
2 45 r 0
2 22 r 1
2 11 r 0
2 5 r 1
2 2 r 1
2 1 r 0
0 r 1
2 137
2 68 r 1
2 34 r 0
2 17 r 0
2 8 r 1
2 4 r 0
2 2 r 0
2 1 r 0
0 r 1
Step 2: Write the left most column down from top to bottom.
2 17
2 8 r 1
2 4 r 0
2 2 r 0
2 1 r 0
0 r 1
Therefore 1710 = 100012
You can test your answer by using the place value. For the above example (i.e. Example 5)
you can test your answer as follows:
Step 1: Write down the place values of the binary number system. It is only necessary to
write down the place values smaller or equal to 1710 and bigger or equal to
0,12510
Step 2: Start at the left-hand side of the decimal comma, and determine from left to right
what combination of place values make up the number 1710
Place values 16 8 4 2 1
Number 1 0 0 0 1
1 + 16 = 1710
Step 3: Start at the decimal comma and determine from right to left what combination of
place values make up the fraction 0,12510
16 + 1+ 0,125 = 17,2510
Exercise
1. Convert the following decimal numbers to binary numbers.
Because the elements of a number system must all be single symbols, the hexadecimal number
system uses the letters A, B, C, D, E and F as elements to represent the values 10 to 15. This is
shown in the table:
Decimal Hexadecimal
10 A
11 B
12 C
13 D
14 E
15 F
256 + 16 + 13 = 28510
Exercise
1. Convert the following hexadecimal numbers to decimal.
a) 2416 b) A216 c) 11016
d) B0316 e) AB1216 f) 1BCD16
Following the relationship between the place values of binary numbers and the hexadecimal
numbers, the conversion between this number system is very simple and quick. Each group of
four bits is replaced with a hexadecimal number.
1011 1001
CSF 10 BT / FIS 11 BT #.9
1011 1001
B 9
A 3
1010 0011
2 C 7
0010 1100 0111
Zero’s in front of a number has no
meaning; therefore you do not need
2C716 = 10 1100 01112
to write it down. It is not wrong to
leave it, i.e. 0010 1100 01112
Exercise
1. Convert the following binary numbers to hexadecimal.
1. Introduction
All data is represented in a computer in one of two conditions, zeros and one’s. To be able to
understand better how a computer works, it is useful to know how numbers are represented in a
computer.
Fewer mistakes are made when the correct data types are used in Turbo Pascal. When
programming in Pascal, it is important to know how the different types of data such as REAL,
INTEGER and LONGINT are represented in the computer.
In other programs such as a database, it is important to know that we get different data types,
for example, integers and real and that the internal representation differs.
Transfer 111
768
+475
1243
The following combinations exist when two single digit binary numbers are added:
0 0 1 1
+0 +1 +0 +1
0 1 1 10 (transfer of 1)
Remember: 12 + 12 + 12 = 112
To check whether the addition was correctly done, the numbers may be changed to decimals.
Exercise
1. Calculate the following:
Example 1: Use 1 byte to represent the numbers, -12 and 12, in the sign-and-size-code.
2 12
2 6 r 0
2 3 r 0
2 1 r 1
0 r 1
Therefore 1210 = 11002
Take note: One byte (7 bits + sign bit = 8 bits) is used throughout for the representa-
tions.
One byte (7 bits + the sign bit = 8 bits) is used throughout for the representations.
Sign-and-size-code:
12 0 0 0 0 1 1 0 0
-12 1 0 0 0 1 1 0 0
Example 2: Convert the number -120 to the sign-and-size-code and represent it in 1 byte.
2 120
2 60 r 0
2 30 r 0
2 15 r 0
2 7 r 1
2 3 r 1
2 1 r 1
0 r 1
Therefore 12010 = 11110002
Sign-and-size-code:
For readability and to
-12010 1 1 1 1 1 0 0 0
use a standard format
throughout, you must
We will write it as: -12010 = 1 1111 0002 write the sign bit, leave
a space followed by four
digits, a space, and the
CSF 10 BT / FIS 11 BT remaining three digits. #.14
The sign-and-size method is not generally used in computers. This type of representation results
in problems when adding is done, as the sign bit must be handled separately from the rest of
the number.
Example 3: Add -12 to 12. (We have used the conversion in Example 1 to just add the two
numbers)
1 0001 100
+0 0001 100
1 0 0 1 1 0 0 02
The answer is -2410, which is wrong. We know the answer is 0. The two’s complement
representation solves this problem.
Exercise
1. Represent the following decimal numbers in the sign-and-size code. Use 1 byte for the
representation.
a) 6710 b) -3510 c) 9710
d) -12410 e) -12710 f) -11110
2. The following binary numbers are written in sign-and-size code. Write down the decimal
equivalent.
a) 0 0001 1012 b) 1 0111 0002 c) 0 0011 1012
d) 1 1101 1112 e) 1 0101 0102 f) 1 1111 1012
Take note: You should know now how to convert numbers. We will only give the
answers in the examples that follow.
1. Change the positive number to a binary number and add zeros in front so that the number is
made up of 8 bits.
2. Change all one’s to zero’s and zero’s to one’s.
3. Add 1.
Step 1: Convert 7110 to a binary number. Use one byte for the representation.
1 0111 0002
Step 3: Add 1.
1 0111 000
+ 1
1 0 1 1 1 0 0 12
Example 1: Determine the decimal value of the two’s complement value of 001001102.
This representation is for a positive number because the left hand bit is 0. To obtain the decimal
value, the binary number must be converted back to decimals.
Step 1: Change all one’s to zero’s and all zero’s to one’s of the number 1 0110 1112.
0 1001 0002
Step 2: Add 1.
0 1001 0012
Exercise
1. Represent the following decimal numbers in the sign-and-size code. Use one byte for the
representation.
a) 3710 b) -5610 c) 8110
d) -11110 e) 10810 f) -12710
2. The following numbers are represented in the sign-and-size code. Give the decimal value
of each representation.
a) 0 0110 1012 b) 0 1110 1112 c) 1 0000 1002
d) 1 1101 1112 e) 0 0001 1012 f) 1 1001 1102
3. Change the following decimal numbers to two’s complement. Use one byte for the
representation.
a) 2510 b) 8110 c) -10210
d) 12610 e) -9910 f) -12310
4. The following binary numbers are represented in two’s complement. Give the decimal
value of each.
a) 0 0101 0102 b) 0 1110 0012 c) 1 0110 1112
d) 1 1111 1102 e) 0 1101 0012 f) 1 0011 1102
65 - 13 = 52
65 + (-13) = 52
5 x 65 = 65 + 65 + 65 + 65 + 65
Division is accomplished using subtraction repeatedly. The number of times the divisor is
subtracted from the dividend is the answer. Division is therefore the repeated addition of the
complement until the result is equal to zero or smaller than the divisor.
260
- 65 1
195
- 65 2
130
- 65 3
65
- 65 4
0
260, 65 = 4
1. Give the binary representation of the numbers in one byte. Add zeros in front so that each
representation consists of 8 bits.
2. Rewrite the subtraction as the “addition of the complement”.
3. Do the necessary binary addition.
4. If there are more than eight bits, ignore the extra bits (left hand side).
5. Write the answer again as decimal numbers if it is requested.
Step 2: Rewrite the subtraction as ‘an addition of the complement’. (K2 means the two’s
complement of the value in brackets.)
= 0 0110 110 + K2(0 0001 101)
= 00110110
+11110011
100101001
Step 4: If there are more than eight bits, ignore the extra bits on the left hand side.
= 0 0101 0012
Step 5: Write the answer again as a decimal number. 0 0101 0012 is a positive number. The
conversion is therefore easy. 0 0101 0012 = 4110. (You know how to do this)
= 4110
Step 2: Rewrite the subtraction as ‘an addition of the complement’. (K2 means the two’s
complement of the value in brackets.)
= 01011010
+10001000
11100010
Step 4: If there are more than eight bits, ignore the extra bits on the left hand side.
= 1 1100 0102
Step 5: The answer is negative. The two’s complement number must be transformed into a
decimal number. (- K2(1 1100 010) = - 0 0011 1102 = - 3010)
= -3010
Example 3: Calculate -3410 – 3510 by using complement arithmetic and give the answer in
decimal.
11011110
+ 11011101
110111011
Exercise
1. Represent the following numbers in two’s complement: 127 and 4. Use 1 byte for the
representation.
2. Calculate the following by making use of two’s complement arithmetic. Check the answers
by changing the two’s complement answers to decimal numbers.
1. Introduction
A computer works on the basic principle of one of two electronic conditions. The two conditions
are represented in the circuits of the computer as either a low or a high voltage (either 0 or 5
Volts for example). The two conditions are also represented by ‘on' or ‘off', ‘1' or ‘0', TRUE or
FALSE. Operations within the computer are done with the two conditions as basis. It is
convenient to use 0 and 1 to represent these two conditions because people are used to work
with numbers.
A unique algebra is designed for the binary number system (0 and 1). George Boole (1815 -
1864), an English mathematician, developed this algebra known as Boolean algebra. Boolean
algebra is a branch of mathematics and involves TRUE or FALSE logic. It was only in 1938 that
C. E. Shannon demonstrated that this algebra could be used in electronic circuitry. Knowledge of
Boolean algebra is useful in the design of the modern computer.
A circuit for temperature control in an air conditioner can be designed by using Boolean algebra
to do the following:
The temperature is regulated to be approximately 200 C. For the circuit the temperature
being the input variable and the switch of the air conditioner being the output.
2.1 Variables
A Boolean variable can only have one of two values, namely TRUE or FALSE.
In algebra it can be represented by a 1 or a 0, and in a physical circuit by a switch, which can be
CLOSED or OPEN.
A single letter of the alphabet represents a Boolean variable. A capital letter or a small letter can
be used, for instance A, B, x, y.
TRUE 1
Current flow
FALSE 0
Current does not flow
2.2 Operators
Like arithmetic, where +, -, x, and ÷ are operators, Boolean algebra also has operators. The
basic operators of Boolean algebra are AND (.), OR (+) and NOT (’). Remember that Boolean
operators are used throughout this chapter. The value of a Boolean variable can only be 0 or 1!
2.2.1 AND-operator
Notation: C = A.B (Read as “C equals A AND B”.)
C = AB
The AND-operator can be illustrated using a circuit diagram with two switches, A and B,
connected in series.
A B
+ S The light bulb L will be on only if
L switch A and switch B are closed.
In other words all the variables have to be 1 in order for the outcome to be 1.
2.2.2 OR-operator
Notation: C=A+B (Read “C equals A OR B”.)
The OR operator can be illustrated using a circuit diagram with two switches, A and B, connected
in parallel.
A
In other words if at least one of the variables equals one, the outcome will be 1.
CSF 10 BT / FIS 11 BT #.22
2.2.3 NOT-operator
Notation: B = A' (Read “B equals NOT A” or “B equals A complement”.)
Take note: We are suppose to write NOT A as A. However, the character size of most
of the letter types differs. In most cases, this causes the NOT-sign not to
be properly above the correct variable (letter). It makes readability quite
difficult. Therefore, for this module we will use the ' (apostrophe) (as
seen above) to indicate the NOT.
1. Brackets
2. NOT
3. AND
4. OR
3. Truth tables
Consider the following examples where functions are evaluated for all possible combinations of
values of the variables used in the function.
Example 1: Evaluate the Boolean function F(A,B) = A.B for all possible combinations of
values that the variables can have.
There are two Boolean variables namely A and B. The two variables can have 22=4 different
combinations.
A B A.B
0 0 0
0 1 0
1 0 0
1 1 1
Example 2: Evaluate the Boolean function F(A,B) = A + B for all possible combinations of
values that the variables can have.
There are two Boolean variables namely A and B. The two variables can have 22=4 different
combinations.
Example 3: Evaluate the Boolean function F(x,y) = xy + x'+ y for all possible combinations
of values that the variables can have.
x y x' xy xy + x'+ y
0 0 1 0 1
0 1 1 0 1
1 0 0 0 0
1 1 0 1 1
Take note: Do the calculation in a series of steps, column by column. First determine all
NOT’s then combinations of variables. Therefore, reduce the expression to its
most simple form. For example, do a' in a separate column and thereafter a'c
(see Example 4).
Example 4: Evaluate the Boolean function F(a,b,c) = ab + a'c + b for all possible
combinations of values that the variables can have.
We can also use truth tables to determine whether two functions are equal to one another.
Exercise
1. Represent each of the following Boolean functions by using a truth table.
a) F(a,b) = a'b + a
b) F(x,y) = (x + y)' + x'y'
c) F(A,B,C) = A'B + B + C'
d) G(a,b,c) = a'b' + c' + (ab)'
e) G(w,x,y,z) = w'xy + (yz' + w)'
Consider the following Laws of Boolean algebra, which can be used to simplify Boolean
expressions.
Identity elements x+0=x x.1 = x
x+1=1 x.0 = 0
Commutative law x+y=y+x
x.y = y.x
Associative law x + (y + z) = (x + y) + z
x.(y.z) = (x.y).z
Distributive law x + (y.z) = (x + y).(x + z)
x.(y + z)= (x.y) + (x.z)
Complementary law x + x' = 1
x.x' = 0
De Morgan’s laws These theorems are related to compliments
(x + y)' = x'y'
(xy)' = x' + y'
Theorems for simplifications x + x = x
x.x = x
x + xy = x
x(x + y) = x
x + x'y = x + y
x(x' + y) = xy
xy + x'z + yz = xy + x'z
Take note: In this module we will not simplify Boolean functions using algebra, but by
means of Karnaugh diagrams (see later). It is however easier to
understand if you know the Laws of Boolean algebra.
Every Boolean function can be expressed as the sum of minterms. You can therefore rewrite a
Boolean function so that all the terms are minterms.
Example 1: Rewrite F(x,y,z) = xyz' + x'yz' + x'y' so that all the terms are minterms.
F(x,y,z) = xyz' + x'yz' + x'y'
= xyz' + x'yz' + x'y'.1 because x'y'.1=x'y'
= xyz' + x'yz' + x'y'(z + z') because z+z'=1 (complementary law)
= xyz' + x'yz' + x'y'z + x'y'z' distributive law
In the above example x'y' is not a minterm (it does not contain all the variables – z is missing).
To make it a minterm you must use the AND-operator and add the variable(s) that is missing.
Apply the distributive law to make those terms minterms.
Example 2: Rewrite F(x,y,z) = x'y + y'z so that all the terms are minterms.
F(x,y,z) = x'y.1 + y'z.1
= x'y(z + z') + y'z(x + x')
= x'yz + x'yz' + xy'z + x'y'z
Example 3: Rewrite F(x,y,z) = y +xyz so that all the terms are minterms.
F(x,y,z) = y + xyz
= y.1 + xyz
= y(x + x') + xyz
= xy + x'y + xyz Because xyz+xyz=xyz
= xy.1 + x'y.1 + xyz you must draw a line
= xy(z + z') + x'y(z + z') + xyz through the repeated
= xyz + xyz' + x'yz + x'yz' + xyz minterms. You can
= xyz + xyz' + x'yz + x'yz' re-write the function.
Example 4: Rewrite F(w,x,y,z) = wx + w’x’y so that all the terms are minterms.
F(w,x,y,z) = wx.1 + w'x'y.1
= wx(y + y') + w'x'y(z + z')
= wxy.1 + wxy'.1 + w'x'yz + w'x'yz'
= wxy(z + z') + wxy'(z + z') + w'x'yz + w'x'yz'
= wxyz + wxyz' + wxy'z + wxy'z' + w'x'yz + w'x'yz'
5.2 Minterms
To write a function in the m-notation, all the terms of the function must be minterms.
5.3 M-notation
Functions can be written in m-notation.
Example 1: Write the function F(x,y) = x'y + xy as the sum of minterms in the m-notation.
F(x,y) = x'y + xy
= m1 + m3
Take note: To write a term quickly in it’s related m-notation do the following:
Example 2: Write the function F(x,y,z) = xyz' + xy'z' + x'y'z' as the sum of minterms in the
m-notation.
F(x,y,z) = xyz' + xy'z' + x'y'z'
= m6 + m4 + m0 You must always write or re-write
= mo + m4 + m6 the m-notation in numerical order.
Example 3: Write the function F(w,x,y,z) = w'xyz' + w'xz as the sum of minterms in the m-
notation.
F(w,x,y,z) = w'xyz' + w'xz
= w'xyz' +w'xz.1
= w'xyz' + w'xz(y + y')
= w'xyz' + w'xyz + w'xy'z
= m6 + m7 + m5
= m5 + m6 + m7
5.4 S-notation
To write a Boolean function in the S-notation, all the terms of the function must be minterms. S-
notation is the same as m-notation, just another manner of writing.
Function: F(x,y,z) = x'y'z' + x'yz + xy'z You must always write or re-
m-notation: F(x,y,z) = m0 + m3 + m5 write the s-notation in
S-notation: F(x,y,z) = S(0,3,5) numerical order.
Exercise
a) G(x,y,z) = xy'z' + xy + yz
b) F(W,X,Y,Z) = Y
c) c) G(A,B,C) = A'B'C + AB'C + A'B d) G(a,b,c) = a'b + ab + a'b'c'
5. If G(a,b,c,d) = abcd + a'b'c write G’(a,b,c,d) as the sum of minterms in the m-notation.
Y
0 1
X
m0 m1
0
X'Y' X'Y
m2 m3
1
XY' XY
YZ
00 01 11 10
X
m0 m1 m3 m2
0
X'Y'Z' X'Y'Z X'YZ X'YZ'
m4 m5 m7 m6
1
XY'Z' XY'Z XYZ XYZ'
YZ
00 01 11 10
WX
m0 m1 m3 m2
00
W'X'Y'Z' W'X'Y'Z W'X'YZ W'X'YZ'
m4 m5 m7 m6
01
W'XY'Z' W'XY'Z W'XYZ W'XYZ'
m12 m13 m15 m14
11
WXY'Z' WXY'Z WXYZ WXYZ'
m8 m9 m11 m10
10
WX'Y'Z' WX'Y'Z WX'YZ WX'YZ'
To simplify the Boolean functions by means of a Karnaugh diagram, the following steps must be
followed:
Step 2: Place the minterms on the Karnaugh diagram. Draw the Karnaugh diagram for the
number of variables namely two, three or four – see below. In the position of the
minterm, a 1 is placed. Refer to the previous discussions for the tables of minterms.
Step 3: Group the adjacent terms. An adjacent term is one that differs in respect of only
variable. The next two terms are adjacent: XYZ’ and XYZ. These terms differ only with
respect to Z. The algebraic simplification of XYZ’ and XYZ is as follows:
XYZ' + XYZ = XY(Z + Z')
= XY
If two adjacent terms are grouped together, they can be simplified to one term. Only
1, 2, 4, 8 and/or 16 number of terms may be grouped together. When grouping
minterms, we must try to group the maximum number of terms together, because the
more minterms that are grouped together, the fewer variables there are in the terms.
YZ
WX 00 01 11 10
Grouping B
00 1 1
1 1
01 Grouping A
1
11 1 1
Grouping C
10 1
Step 4: Make deductions from groupings in terms of variables. Therefore simplify, if possible,
each group and express it in terms of variables.
Grouping A
The variables X and Z do not change in value in the grouping.
The variables W and Y changes in value and may be omitted.
The term for the grouping is thus XZ.
Grouping B
The variables W’, X’ and Y’ do not change in value in the grouping.
The variable Z changes in value and may be omitted.
The term for the grouping is thus W'X'Y'
Grouping C
The variables W, Y and Z’ do not change in value in the grouping.
The variable X changes in value and may be omitted.
The term for the grouping is thus WYZ'
bc
00 01 11 10
a
0 1
1 1 1 1 1
bc
00 01 11 10
a
1
0
1 1 1 1 1
Step 4: Make deductions from groupings in terms of variables. Simplify the function.
bc
00 01 11 10
a
1
0
1 1 1 1 1
F(a,b,c) = a + bc'
Example 2: Simplify the following function using a Karnaugh map and then divert the
simplest function:
YZ
WX 00 01 11 10 Remember you must group the
maximum number of terms
00 1 1 1 together. If you have group the
two terms in the first row, first
01 1 two columns and last row, first
two columns it would have seemed
11 1 1 right, but it is not the maximum
number of terms together. Also
10 1 1 remember we have said earlier
that it is more efficient to build the
circuit for the simplest function.
F(W,X,Y,Z) = X'Y' + W'YZ + WXY
Grouping 1
bc
a 00 01 11 10
1
0 1 1
1 1 1 1
Grouping 2
bc
a 00 01 11 10
0 1 1 1
1 1 1 1
A different grouping can also be made that will not be wrong. The simplified function will have
the same number of terms and the same number of variables in the relevant term.
Exercise
Use Karnaugh diagrams to represent the following Boolean functions. Deduce for each a function
with the fewest terms and the fewest variables in each term.
7. Circuits
In 1938 CE Shannon showed that Boolean algebra could be used to represent electronics
circuits. The symbolic representation of the AND, OR, NOT, NAND and NOR gates are given:
AND
X
Y
OR
X
+
Y
NOT
X X'
NAND
X
Y
NOR
X
+
Y
Take note: These are the only symbols accepted in this module. You must include the
sign inside the symbol, else the symbol is wrong.
Example 1: Draw the circuit for the function F(A,B) = A'B' + AB.
A
B
Take note: The Boolean variables A and B can have the value of 0 and 1. Different
voltage levels represent a 0 or a 1. A high voltage level represents a logical
1-state end a low voltage level a logical 0-state. The Boolean operators also
known as logic gates, is an electronic apparatus that has one or more
inputs and one output.
y +
Example 3: Draw the circuit for the function G(x,y,z) = (x + y + z)' + x'z'.
y +
z
+
Exercise
1. Draw circuits of the following Boolean functions:
a) F(a,b) = a + b + ab
b) G(x,y) = (x + y')' + y
c) F(x,y,z) = (x + y + z)' + (x'y')'
d) F(A,B,C) = AB + (A + C')' + BC
e) G(w,x,y,z) = w'x + xy + wz
f) G(X,Y,Z) = ((XYZ + X'Z' + Y'Z)( XY + X'Z'))'
PLACE VALUES:
Decimal
Power
,
Place
Value ,
,
X10 ,
Binary
Power
,
Place
Value ,
,
X2 ,
Octal Hexadecimal
Power
,
Place
Value ,
,
X8 , X16
Binary
Power
,
Place
Value ,
,
X2 ,
,
Number Systems
Binary and Binary Conversion
bit:
NUMBER SYSTEMS
Number Base Number of Symbols used to represent numbers
Symbols
System
Must
include the
1101112= base
1100,0112 =
TEST
YOUR
ANSWER
10111,1012 =
9010 17110
0,2510 0,62510
20,50 191,875
2010 19110
0,5010 0,87510
1FF16 =
29816 =
28510 48910
11100010102 =
Zero’s in
front of
number
101011002 =
has no
meaning
but is not
2BF16 =
wrong
A8216 =
Sign-and-Size-Code
Positive Number: Extra bit
Negative Number: Extra bit
35 =
-162 =
84 =
11101111 =
00011101 =
00001101 =
Two’s Compliment
BINARY ADDITIONS
0 0 1 1
+ 0 + 1 + 1 1
+ 1
8710 =
12310 =
Give the Two’s Compliment Representation of the following:
- 7110 =
- 2010 =
- 5210 =
0 0100 1102
0 1001 1112
1 0110 1112
1 1111 1102
0 1101 0012
5410 - 1310
3410 - 3516
-2410 - 418
Truth Tables:
Truth Tables
Value In Algebra Physical representation
Operators:
Operator Notation Meaning Physical representation
Order of precedence:
1. _______________________________________
2. _______________________________________
3. _______________________________________
4. _______________________________________
Evaluate Boolean Function F(A,B) = A.B for all possible combinations of values that the variables can have.
A and B can have 22 = 4 different combinations:
Evaluate Boolean Function F(A,B) = A + B for all possible combinations of values that the variables can have.
A and B can have 22 = 4 different combinations:
Evaluate Boolean Function F(A,B) = A ‘ B for all possible combinations of values that the variables can have.
A and B can have 22 = 4 different combinations:
Evaluate Boolean Function F(x, y)) = xy + x’ + y for all possible combinations of values that the variables can have.
Evaluate Boolean Function F( x , y ) = x + x’y’ + xy for all possible combinations of values that
the variables can have.
Evaluate Boolean Function F( x , y , z ) = x’y + yz’ + x + z for all possible combinations of values
that the variables can have.
Evaluate Boolean Function F( a , b , c ) = (a’c + bc)abc + a’b’ for all possible combinations of
values that the variables can have.
Evaluate: F ( x , y , z ) = G ( x , y , z ) where
F ( x , y , z ) = x’y’z + xyz’ and G ( x , y , z ) = ( x + y )’z + xy’
Evaluate: F ( a , b , c ) = G ( a , b , c ) where
F ( x , y , z ) = (ab + b’c) + a’c’ and G ( x , y , z ) = ( a + b )’c + ab’
Evaluate: F ( x , y , z ) = G ( x , y , z ) where
F ( x , y , z ) = x’y’z + xyz’ and G ( x , y , z ) = ( xz’ + y )z’ + xy’z
Revision
Adding Binary
1
0 0 1 1 1
+0 +1 +0 +1 +1
Sign-and-Size
Questions usually say to convert a number to sign-and-size and represent it in 1 byte (8 bits)
Question
Convert the following decimal numbers to Sign and Size and represent your answer in 1Byte:
6310
Add 1
Add 1
6010 - 3010
-2810 - 5210