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

Lecture 3-Chapter - 1 - Digital - Systems - and - Binary - Numbers

The document discusses signed binary numbers and binary-coded decimal (BCD). It provides examples of adding and subtracting signed binary numbers using two's complement representation. It also describes how decimal numbers are represented in BCD, including an example of BCD addition. Finally, it briefly mentions other decimal codes and gray code.

Uploaded by

muhammad khubab
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)
45 views

Lecture 3-Chapter - 1 - Digital - Systems - and - Binary - Numbers

The document discusses signed binary numbers and binary-coded decimal (BCD). It provides examples of adding and subtracting signed binary numbers using two's complement representation. It also describes how decimal numbers are represented in BCD, including an example of BCD addition. Finally, it briefly mentions other decimal codes and gray code.

Uploaded by

muhammad khubab
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/ 7

Signed Binary Numbers

 Arithmetic addition
◆ The addition of two numbers in the signed-magnitude system follows the rules of
ordinary arithmetic. If the signs are the same, we add the two magnitudes and
give the sum the common sign. If the signs are different, we subtract the smaller
magnitude from the larger and give the difference the sign if the larger magnitude.
◆ The addition of two signed binary numbers with negative numbers represented in
signed-2's-complement form is obtained from the addition of the two numbers,
including their sign bits.
◆ A carry out of the sign-bit position is discarded.

 Example:

Digital Logic Design Ch1-33


Signed Binary Numbers

 Arithmetic Subtraction
◆ In 2’s-complement form:
1. Take the 2’s complement of the subtrahend (including the sign bit)
and add it to the minuend (including sign bit).
2. A carry out of sign-bit position is discarded.

(  A) − ( + B) = (  A) + ( − B)
(  A) − ( − B) = (  A) + ( + B)
 Example:

(− 6) − (− 13) (11111010 − 11110011)


(11111010 + 00001101)
00000111 (+ 7)
Digital Logic Design Ch1-34
1.7 Binary Codes

 BCD Code
◆ A number with k decimal digits will
require 4k bits in BCD.
◆ Decimal 396 is represented in BCD
with 12bits as 0011 1001 0110, with
each group of 4 bits representing one
decimal digit.
◆ A decimal number in BCD is the
same as its equivalent binary number
only when the number is between 0
and 9.
◆ The binary combinations 1010
through 1111 are not used and have
no meaning in BCD.

Digital Logic Design Ch1-35


Binary Code

 Example:
◆ Consider decimal 185 and its corresponding value in BCD and binary:

 BCD addition

Digital Logic Design Ch1-36


Binary Code

 Example:
◆ Consider the addition of 184 + 576 = 760 in BCD:

 Decimal Arithmetic: (+375) + (-240) = +135

Hint 6: using 10’s of BCD

Digital Logic Design Ch1-37


Binary Codes

 Other Decimal Codes

Digital Logic Design Ch1-38


Binary Codes)

 Gray Code
◆ The advantage is that only bit in the
code group changes in going from
one number to the next.
» Error detection.
» Representation of analog data.
» Low power design.

000 001

010 011
100 101

110 111

1-1 and onto!! Digital Logic Design Ch1-39

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy