0% found this document useful (0 votes)
4 views

Digital Logic Design Week 1 Lecture 2

The document covers number system conversions including decimal to binary, octal, and hexadecimal, as well as binary to decimal and other conversions. It also discusses binary arithmetic representation, including unsigned and signed representations, and methods for binary subtraction using 1's and 2's complements. The content is aimed at understanding digital logic design principles in the context of computer science and engineering.

Uploaded by

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

Digital Logic Design Week 1 Lecture 2

The document covers number system conversions including decimal to binary, octal, and hexadecimal, as well as binary to decimal and other conversions. It also discusses binary arithmetic representation, including unsigned and signed representations, and methods for binary subtraction using 1's and 2's complements. The content is aimed at understanding digital logic design principles in the context of computer science and engineering.

Uploaded by

sajib25yhoo.com
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 16

CSE 1325: Digital Logic Design

Sidratul Tanzila Tasmi


Department of Computer Science and Engineering
United International University

1
Number System Conversion

2
Decimal to Binary Conversions

A) Divide the Number (Decimal


Number) by the base of target base
system.

B) Write the remainder from step 1 as


a Least Signification Bit (LSB) to Step
last as a Most Significant Bit (MSB).

3
Decimal to Binary Conversions
For Fractional Part,
Multiply given fraction portion with 2
and store the integer portion of the
resultant.

4
Decimal to Octal and Hexadecimal Conversion

5
Binary to Decimal Conversion

6
Binary to Octal Conversions

7
Binary to Hexadecimal Conversions

8
Octal to Other Conversions
Octal to Decimal

345 octal = (3 * 82 ) + (4 * 81 ) + (5 * 80 ) = (3 * 64) + (4 * 8) + (5 * 1)

Octal to Hexadecimal
Octal to Binary

9
Hexadecimal to Other Conversions

Hexadecimal to Binary

10
Data Arithmetic Representation

11
Binary Arithmetic
Unsigned representation
+6 = 110
-6 = No representation
Range: 0 to 2n

Signed representation
+6=0 110
-6= 1 110
Range: -(2n-1-1) to +(2n-1-1)

12
Using Complement
• r‘s complement / radix complement
• (r-1)’s complement / diminished radix complement

• Let us at first understand complements in our number system:


• 10’s complement of a number = 10len – the number
• 9’s complement of a number – traverse the number and subtract every digit from
9
• Also : 10’s complement = 9’s complement + 1

10’s Complement of 253 is 103-253= 747


9’s complement of 253 is 746
(9-2) (9-5) (9-3)

13
Binary Subtraction using 1’s Complement
Use 1’s complement
1. Take 1’s comp of no you are
subtracting
2. Add it
3. If the final carry is 1, add to
result
4. If the carry is 0, the result is
negative in 1’s
Complement

Be careful about the assigning of


sign bits and Value bits

14
Binary Subtraction using 2’s Complement
Use 2’s complement
1. Take 2’s comp of no you are subtracting
2. Add it
3. If the final carry is 1, the result is positive
4. If the carry is 0, the result is negative

Be careful about the assigning of sign bits


and
Value bits

15
THANK YOU!
Reference:
Digital Logic and Computer Design. M. Morris Mano (1979).

16

You might also like