0% found this document useful (0 votes)
5 views11 pages

Binary Numbers in Digital Logic Design

The document covers the basics of binary numbers, including their representation in digital logic design and their conversion between binary and decimal systems. It explains how binary is used to represent numbers, text, images, sound, and instructions in computing. Additionally, it provides algorithms for converting binary to decimal and vice versa, along with examples and exercises for practice.

Uploaded by

officialarikpa
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
5 views11 pages

Binary Numbers in Digital Logic Design

The document covers the basics of binary numbers, including their representation in digital logic design and their conversion between binary and decimal systems. It explains how binary is used to represent numbers, text, images, sound, and instructions in computing. Additionally, it provides algorithms for converting binary to decimal and vice versa, along with examples and exercises for practice.

Uploaded by

officialarikpa
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd

Week 2a

Course Code:Digital Logic Design


Coure Code:IFT 213
Level:200
Program: Computer Science
Course Lecturer: Assoc Prof Ageebee Silas Faki
Email: [Link]@[Link]
Mobile/Whatsapp: +2348066238988
Binary Numbers
• Most basic hardware level (transistors, the building blocks of all modern
chips), represent information with electrical signals. Thu the status of:
• ON (1): Voltage is pesent (5 volts, 3 volts etc)
• OFF(0): Voltage little or not present (0 volts)
• Also:
• The use of
• 1 to repersent TRUE
• 0 to reperesnt False
• is used in building complex Logic gates.
• How Binary Buid it system
• 1. Numbers: Larger numbers are easily represented by combining
multiple bits (Binary Digits). For example, 8 bits (a byte) can represent
256 different values (0-255).
• 2. Text: Each character (letter, number, punctuation) is assigned a
specific binary code. For example, in ASCII encoding, the capital 'A' is
01000001.
• 3. Images: An image is broken down into a grid of tiny dots (pixels).
The image is procesed to a gray image which have pure black (0) and
pure white (1).
• 4. Sound: Sound waves are sampled thousands of times per second,
and each sample's amplitude is stored as a binary number.
• 5. Instructions: The commands that tell the CPU what to do (add,
subtract, move data) are themselves encoded in binary as machine
code.
Binary Numbers

• A number system with a base of 2.

• Uses only two digits: 0 and 1.

• Each digit is called a Bit (Binary Digit).

• A group of 8 bits is called a Byte.


• Convert: Binary → Decimal
• Algorithm
• Step 1: Write down the binary number.
• Step 2: Assign place values from the right begining with 0 (2⁰ = 1).
• Step 3: Multiply each bit by its corresponding power of 2.
• Step 4: Add (sum) all the results together.

• Exampl 1101 = 1x23+1x22+0x21+1x20


• = 1x2 x2x2 + 1x2x2 + 1x1
• =8+ 4 + 1
• = 1310
• convert 110.101 to a number in base 10
• Step 1: Convert the integer part from binary to decimal by summing
powers of 2 for each bit
• Step 2: Convert the fractional part by summing negative powers of 2
for each bit:
• Solution
• 1x22 +1x21+0x20+1x2-1+0x2-2+1x2-3
• 1x4 + 1x2+0x1 + 1x + 0 x + 1 x
• 4 + 2 0 + + 0 + = 10
• Convtion from Decimal to Binay (Repaeted Division method)
• Algorithm:
• Step 1: Do repaeted divison keeping the remianders
• Step 2: Read the reainders from bottom up
• Convert 2510 to binary
• Solution:
• 25 ÷ 2 = 12 Remaider (r) 1
• 12 ÷2 = 6 r 0
• 6÷2=3r0
• 3÷2=1r1
• 1÷ 2 = 0 r 1 read bottom up
• Answer = 110012
• Convert 153.687510 to binary
• Algoritm. (treat the wholenumber and the fraction seperately)
• Step 1: Covert 153 to binary by reapeted division saving the
remainders
• Step 2: 0.6875 to binry by repeated multiplication by 3 nothing the
integer part (where intger may be either a 0 or a 1).
• Demonstration on the board.
• Excercie: Student to convert 41.687510 to binary (101001.10112)
Addition,Subtraction,Multilication and Division with Binary numbers.
1. Addition
Add 1110 to 1011 = 1 1 1 0
+1 0 1 1
11 0 0 1
[Link] 11.100 to 101.111 in binary
Align the decimal point and do [Link] answer 1001.0112

End of Lecture Week 2a

You might also like