Category: Subjects

Half Subtractor | Definition | Circuit Diagram | Truth Table

Half Subtractor-

 

  • Half Subtractor is a combinational logic circuit.
  • It is used for the purpose of subtracting two single bit numbers.
  • It contains 2 inputs and 2 outputs (difference and borrow).

 

 

Half Subtractor Designing-

 

Half subtractor is designed in the following steps-

 

Step-01:

 

Identify the input and output variables-

  • Input variables = A, B (either 0 or 1)
  • Output variables = D, b where D = Difference and b = borrow

 

Step-02:

 

Draw the truth table-

 

Inputs Outputs
A B D (Difference) b (Borrow)
0 0 0 0
0 1 1 1
1 0 1 0
1 1 0 0

Truth Table

 

Step-03:

 

Draw K-maps using the above truth table and determine the simplified Boolean expressions-

 

 

Also Read- Half Adder

 

Step-04:

 

Draw the logic diagram.

The implementation of half subtractor using 1 XOR gate, 1 NOT gate and 1 AND gate is as shown below-

 

 

Limitation of Half Subtractor-

 

  • Half subtractors do not take into account “Borrow-in” from the previous circuit.
  • This is a major drawback of half subtractors.
  • This is because real time scenarios involve subtracting the multiple number of bits which can not be accomplished using half subtractors.

 

To overcome this drawback, Full Subtractor comes into play.

 

To gain better understanding about Half Subtractor,

Watch this Video Lecture

 

Next Article- Full Subtractor

 

Get more notes and other study material of Digital Design.

Watch video lectures by visiting our YouTube channel LearnVidFun.

Full Adder | Definition | Circuit Diagram | Truth Table

Half Adder-

 

Before you go through this article, make sure that you have gone through the previous article on Half Adder.

 

We have discussed-

  • Half Adder is used for the purpose of adding two single bit numbers.
  • Half adders have no scope of adding the carry bit resulting from the addition of previous bits.
  • To overcome this drawback, full adder comes into play.

 

 

In this article, we will discuss about Full Adder.

 

Full Adder-

 

  • Full Adder is a combinational logic circuit.
  • It is used for the purpose of adding two single bit numbers with a carry.
  • Thus, full adder has the ability to perform the addition of three bits.
  • Full adder contains 3 inputs and 2 outputs (sum and carry) as shown-

 

 

Full Adder Designing-

 

Full adder is designed in the following steps-

 

Step-01:

 

Identify the input and output variables-

  • Input variables = A, B, Cin (either 0 or 1)
  • Output variables = S, Cout where S = Sum and Cout = Carry

 

Step-02:

 

Draw the truth table-

 

Inputs
Outputs
A B Cin Cout (Carry) S (Sum)
0 0 0 0 0
0 0 1 0 1
0 1 0 0 1
0 1 1 1 0
1 0 0 0 1
1 0 1 1 0
1 1 0 1 0
1 1 1 1 1

Truth Table

 

Step-03:

 

Draw K-maps using the above truth table and determine the simplified Boolean expressions-

 

 

Also Read- Full Subtractor

 

Step-04:

 

Draw the logic diagram.

The implementation of full adder using 1 XOR gate, 3 AND gates and 1 OR gate is as shown below-

 

 

To gain better understanding about Full Adder,

Watch this Video Lecture

 

Next Article- Half Subtractor

 

Get more notes and other study material of Digital Design.

Watch video lectures by visiting our YouTube channel LearnVidFun.

Half Adder | Definition | Circuit Diagram | Truth Table

Half Adder-

 

  • Half Adder is a combinational logic circuit.
  • It is used for the purpose of adding two single bit numbers.
  • It contains 2 inputs and 2 outputs (sum and carry).

 

 

Half Adder Designing-

 

Half adder is designed in the following steps-

 

Step-01:

 

Identify the input and output variables-

  • Input variables = A, B (either 0 or 1)
  • Output variables = S, C where S = Sum and C = Carry

 

Step-02:

 

Draw the truth table-

 

Inputs Outputs
A B C (Carry) S (Sum)
0 0 0 0
0 1 0 1
1 0 0 1
1 1 1 0

Truth Table

 

Step-03:

 

Draw K-maps using the above truth table and determine the simplified Boolean expressions-

 

 

Also Read- Half Subtractor

 

Step-04:

 

Draw the logic diagram.

The implementation of half adder using 1 XOR gate and 1 AND gate is as shown below-

 

 

Limitation of Half Adder-

 

  • Half adders have no scope of adding the carry bit resulting from the addition of previous bits.
  • This is a major drawback of half adders.
  • This is because real time scenarios involve adding the multiple number of bits which can not be accomplished using half adders.

 

To overcome this drawback, Full Adder comes into play.

 

To gain better understanding about Half Adder,

Watch this Video Lecture

 

Next Article- Full Adder

 

Get more notes and other study material of Digital Design.

Watch video lectures by visiting our YouTube channel LearnVidFun.

ER Diagrams to Tables | Practice Problems

ER Diagrams to Tables-

 

Before you go through this article, make sure that you have gone through the previous article on ER Diagrams to Tables.

 

After designing an ER Diagram,

  • ER diagram is converted into the tables in relational model.
  • This is because relational models can be easily implemented by RDBMS like MySQL , Oracle etc.
  • The rules used for converting an ER diagram into the tables are already discussed.

 

In this article, we will discuss practice problems based on converting ER Diagrams to Tables.

 

PRACTICE PROBLEMS BASED ON CONVERTING ER DIAGRAM TO TABLES-

 

Problem-01:

 

Find the minimum number of tables required for the following ER diagram in relational model-

 

 

Solution-

 

Applying the rules, minimum 3 tables will be required-

  • MR1 (M1 , M2 , M3 , P1)
  • P (P1 , P2)
  • NR2 (P1 , N1 , N2)

 

Problem-02:

 

Find the minimum number of tables required to represent the given ER diagram in relational model-

 

 

Solution-

 

Applying the rules, minimum 4 tables will be required-

  • AR1R2 (a1 , a2 , b1 , c1)
  • B (b1 , b2)
  • C (c1 , c2)
  • R3 (b1 , c1)

 

Problem-03:

 

Find the minimum number of tables required to represent the given ER diagram in relational model-

 

 

Solution-

 

Applying the rules, minimum 5 tables will be required-

  • BR1R4R5 (b1 , b2 , a1 , c1 , d1)
  • A (a1 , a2)
  • R2 (a1 , c1)
  • CR3 (c1 , c2 , d1)
  • D (d1 , d2)

 

Problem-04:

 

Find the minimum number of tables required to represent the given ER diagram in relational model-

 

 

Solution-

 

Applying the rules, minimum 3 tables will be required-

  • E1 (a1 , a2)
  • E2R1R2 (b1 , b2 , a1 , c1 , b3)
  • E3 (c1 , c2)

 

Problem-05:

 

Find the minimum number of tables required to represent the given ER diagram in relational model-

 

 

Solution-

 

Applying the rules that we have learnt, minimum 6 tables will be required-

  • Account (Ac_no , Balance , b_name)
  • Branch (b_name , b_city , Assets)
  • Loan (L_no , Amt , b_name)
  • Borrower (C_name , L_no)
  • Customer (C_name , C_street , C_city)
  • Depositor (C_name , Ac_no)

 

Next Article- Constraints in DBMS

 

Get more notes and other study material of Database Management System (DBMS).

Watch video lectures by visiting our YouTube channel LearnVidFun.

Types of Attributes | DBMS

Attributes in ER Diagram-

 

Before you go through this article, make sure that you have gone through the previous article on Introduction to ER Diagrams.

 

  • Attributes are the descriptive properties which are owned by each entity of an Entity Set.
  • There exist a specific domain or set of values for each attribute from where the attribute can take its values.

 

Types of Attributes-

 

In ER diagram, attributes associated with an entity set may be of the following types-

 

 

  1. Simple attributes
  2. Composite attributes
  3. Single valued attributes
  4. Multi valued attributes
  5. Derived attributes
  6. Key attributes

 

1. Simple Attributes-

 

Simple attributes are those attributes which can not be divided further.

 

Example-

 

 

Here, all the attributes are simple attributes as they can not be divided further.

 

2. Composite Attributes-

 

Composite attributes are those attributes which are composed of many other simple attributes.

 

Example-

 

 

Here, the attributes “Name” and “Address” are composite attributes as they are composed of many other simple attributes.

 

3. Single Valued Attributes-

 

Single valued attributes are those attributes which can take only one value for a given entity from an entity set.

 

Example-

 

 

Here, all the attributes are single valued attributes as they can take only one specific value for each entity.

 

4. Multi Valued Attributes-

 

Multi valued attributes are those attributes which can take more than one value for a given entity from an entity set.

 

Example-

 

 

Here, the attributes “Mob_no” and “Email_id” are multi valued attributes as they can take more than one values for a given entity.

 

5. Derived Attributes-

 

Derived attributes are those attributes which can be derived from other attribute(s).

 

Example-

 

 

Here, the attribute “Age” is a derived attribute as it can be derived from the attribute “DOB”.

 

6. Key Attributes-

 

Key attributes are those attributes which can identify an entity uniquely in an entity set.

 

Example-

 

 

Here, the attribute “Roll_no” is a key attribute as it can identify any student uniquely.

 

Next Article- Converting ER Diagrams to Tables

 

Get more notes and other study material of Database Management System (DBMS).

Watch video lectures by visiting our YouTube channel LearnVidFun.