0% found this document useful (0 votes)
4 views4 pages

Binary Concepts

The document provides a comprehensive guide on number base conversions, including octal, binary, and hexadecimal, along with their respective examples. It also covers binary arithmetic rules for addition and subtraction, signed and unsigned numbers, and the use of 2's complement for negative number representation. Additionally, it explains De Morgan's laws, ASCII code, BCD representation, and the functionality of half and full adders in digital circuits.
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 views4 pages

Binary Concepts

The document provides a comprehensive guide on number base conversions, including octal, binary, and hexadecimal, along with their respective examples. It also covers binary arithmetic rules for addition and subtraction, signed and unsigned numbers, and the use of 2's complement for negative number representation. Additionally, it explains De Morgan's laws, ASCII code, BCD representation, and the functionality of half and full adders in digital circuits.
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/ 4

1.

Conversion: Octal to Binary and Vice Versa

- Octal to Binary:

Each octal digit is represented by its 3-bit binary equivalent.

Example: 237_8 -> 010 011 111_2

- Binary to Octal:

Group binary digits into groups of 3 (starting from the right). Add leading zeros if needed,

then convert each group to an octal digit.

Example: 1011101_2 -> 001 011 101 -> 135_8

2. Conversion: Hexadecimal to Binary and Vice Versa

- Hexadecimal to Binary:

Each hexadecimal digit is represented by its 4-bit binary equivalent.

Example: 2F_H -> 0010 1111_2

- Binary to Hexadecimal:

Group binary digits into groups of 4 (from the right), then convert each group to its hexadecimal equivalen

Example: 11010101_2 -> 1101 0101 -> D5_H

3. Basic Rules for Addition and Subtraction of Binary Numbers

- Addition:

-0+0=0

-0+1=1

- 1 + 1 = 10 (carry 1)

- 1 + 1 + 1 = 11 (carry 1)
- Subtraction:

-0-0=0

-1-0=1

- 0 - 1 = 1 (borrow 1)

-1-1=0

4. Example: Addition and Subtraction of Two 8-bit Binary Numbers

Let A = 11010101_2 and B = 01101011_2.

- Addition:

11010101

+ 01101011

= 101111000 (Carry 1, 8-bit result is 01111000)

- Subtraction (A - B):

Use 2's complement method:

- Find 2's complement of B: Invert B to 10010100 and add 1 -> 10010101.

- Add A and 2's complement of B:

11010101

+ 10010101

= 1 01101010 (Ignore carry, result is 01101010)

5. Signed and Unsigned Numbers

- Signed Numbers: Use the most significant bit (MSB) to indicate the sign (0 = positive, 1 = negative).

- Range: -2^(n-1) to 2^(n-1) - 1.

- Unsigned Numbers: Represent only non-negative values.


- Range: 0 to 2^n - 1.

6. 2's Complement of a Negative Number

The 2's complement is used to represent negative numbers.

- To Find 2's Complement:

1. Invert all bits (1's complement).

2. Add 1 to the result.

Example: 10101 -> 01010 + 1 = 01011.

7. Using 2's Complement in Subtraction

To subtract A - B, add A and the 2's complement of B.

- If the result is negative:

Take the 2's complement of the result to find the magnitude.

8. De Morgan's Laws

1. (A * B)' = A' + B'

2. (A + B)' = A' * B'

9. ASCII Code

The American Standard Code for Information Interchange (ASCII) assigns a unique 7-bit code to character

allowing communication between computers and devices.

10. BCD (Binary-Coded Decimal)

BCD represents decimal numbers using 4 binary bits per digit.

Example: 45_10 -> 0100 0101.

11. BCD to Decimal Converter


A BCD to decimal converter translates BCD input into decimal output using AND gates and decoders.

12. Input and Output of a Half Adder

- Inputs: Two binary digits (A, B).

- Outputs:

- Sum (S = A XOR B)

- Carry (C = A * B)

13. Circuit for Full Adder Using Two Half Adders

The circuit includes:

- Two half adders: HA1 for inputs A, B; HA2 for S1 and Cin.

- An OR gate to combine carry outputs.

14. Sum Output in Full Adder

The sum output is the XOR of all three inputs:

S = A XOR B XOR Cin.

15. Input and Output of a Full Adder

- Inputs: Three binary digits (A, B, Cin).

- Outputs:

- Sum (S = A XOR B XOR Cin)

- Carry (Cout = (A * B) + (Cin * (A XOR B)))

You might also like