Documente Academic
Documente Profesional
Documente Cultură
Week 1
By Ayesha Durrani
System programming
System programming (or systems programming) is
the activity of Computer Programming System
Software.
Application programming: aims to produce
software which provides services to the user e.g. MS
office
System Programming: aims to produce software
which provides services to the computer hardware
Binary Integers
Binary Integers
Binary numbers are base 2 numbers, in
which each binary digit (called a bit) is
either 0 or 1
Bits are numbered sequentially starting at
zero on the right side and increasing
toward the left.
most significant bit (MSB), vs least
significant bit (LSB).
Example
Large Measurements of
Storage
Hexadecimal Integers
Why Hexadecimal Integers??
Large binary numbers are difficult to
read
hexadecimal digits offer a convenient
way to
represent binary data.
Each digit in a hexadecimal integer
represents four binary bits called
nibble
Base is 16
Practice Exercise
Convert the following binary to
Hexadecimal
01101010011110010100??
Converting Hexadecimal to
Decimal
hexadecimal 3BA4 is equal to:
(3 x 163) + (11 x 162) + (10 x 161) (4
x 160),
or decimal 15,268.
Converting Decimal to
Hexadecimal
To convert a decimal integer to
hexadecimal, repeatedly divide the
decimal value by 16
retain each remainder as a hexadecimal
digit.
Example 422 can be converted as:
Result: 1A616
Practice Exercise
Q1: What is the decimal representation of each
of the following unsigned binary integers?
11111000
11001010
11110000
Q2 What is the sum of each pair of binary
integers?
00001111 + 00000010
11010101 + 01101011
00001111 + 00001111
Practice Exercise
Q3: What is the binary representation of the
following hexadecimal numbers?
E5B6AED7
B697C7A1
234B6D92
Q4: What is the unsigned decimal
representation of each hexadecimal integer?
62
1C9
6A5B
Boolean Operations
A boolean expression involves a boolean
operator and one or more operands.
Each boolean expression implies a value of
true or false.
The set of operators includes the following:
NOT: notated as or ~
AND: notated as
OR: notated as
NOT operator
The NOT operator is unary, and the
other operators are binary.
The NOT operation reverses a
boolean value
written in mathematical notation as
X,
The following truth table shows all
the possible outcomes:
AND operation
AND: The Boolean AND operation
requires two operands:
expressed using the notation X Y
OR operation
OR The Boolean OR operation
requires two operands:
expressed using the notation X Y.
Practice Exercise
Q1: Create a truth table for the boolean
function
described by (A ).
Q2: Create a truth table for the
boolean function
described by ( A B).
End lecture 01