Sunday, July 27, 2025

Subtractions & K Map Practice questions

 All  the students are informed complete the assignment for K MAP both in POS & SOP, realize using NAND & NOR gates

24B81A0401
a) Simplify F(A, B, C) = Σ(0, 2, 4, 6) realize using NAND & NOR gates
b) Subtract 245 - 123 using 9's & 10’s complement.

24B81A0402
b)Find the minimized SOP expression for 
    F = Σ(1, 3, 5) & realize using NAND & NOR gates.    
a) Subtract 370 - 198 using 9's & 10’s complement.

24B81A0403
a) Use K-Map to simplify F = Σ(0, 1, 2, 3)& realize using NAND & NOR gates.
b) Subtract 120 - 389 using 9's & 10’s complement.

24B81A0404
b) Derive minimal expression for F = Σ(2, 3, 6)& realize using NAND & NOR gates.
a) Subtract 684 - 159 using 9's & 10’s complement.

24B81A0405
a) Find SOP form for F = Σ(0, 4, 5, 6)& realize using NAND & NOR gates.
b) Subtract 200 - 450 using 9's & 10’s complement.

24B81A0406
b) Simplify F = Σ(0, 1, 4)& realize using NAND & NOR gates.
a) Subtract 999 - 321 using 9's & 10’s complement.

24B81A0407
a) Use K-Map to simplify F = Σ(1, 2, 4, 7)& realize using NAND & NOR gates.
b) Subtract 805 - 607 using 9's & 10’s complement.

24B81A0408
b) Derive minimal SOP form for F = Σ(3, 5, 7)& realize using NAND & NOR gates.
a) Subtract 431 - 431 using 9's & 10’s complement.

24B81A0409
a) Find simplified function for F = Σ(0, 1, 5, 6)& realize using NAND & NOR gates.
b) Subtract 300 - 150 using 9's & 10’s complement.

24B81A0410
b) Use K-Map to simplify F = Σ(2, 3, 4, 5)& realize using NAND & NOR gates.
a) Subtract 111 - 777 using 9's & 10’s complement.

24B81A0411
a) Simplify F(A, B, C) = Π(1, 3, 5)& realize using NAND & NOR gates.
b) Subtract 236 - 142 using 9's & 10’s complement.

24B81A0412
b) Minimize F = Π(0, 2, 4, 6)& realize using NAND & NOR gates.
a) Subtract 415 - 215 using 9's & 10’s complement.

24B81A0413
a) Derive POS form for F = Π(2, 3, 6)& realize using NAND & NOR gates.
b) Subtract 150 - 389 using 9's & 10’s complement.

24B81A0414
b) Simplify F = Π(0, 4, 5, 6)& realize using NAND & NOR gates.
a) Subtract 822 - 313 using 9's & 10’s complement.

24B81A0415
a) Use K-Map to simplify F = Π(0, 2, 3, 7)& realize using NAND & NOR gates.
b) Subtract 290 - 190 using 9's & 10’s complement.

24B81A0416
b) Simplify using K-Map: F = Π(1, 4, 6)& realize using NAND & NOR gates.
a) Subtract FF3 - F99 using 15's & 16’s complement.

24B81A0417
a) Minimize F = Π(0, 1, 2, 3)& realize using NAND & NOR gates.
b) Subtract 100 - 001 using 9's & 10’s complement.

24B81A0418
b) Find POS for F = Π(3, 5, 7)& realize using NAND & NOR gates.
a) Subtract 212 - 121 using 9's & 10’s complement.

24B81A0419
a) Derive POS form for F = Π(0, 2, 5, 6)& realize using NAND & NOR gates.
b) Subtract 485 - 378 using 9's & 10’s complement.

24B81A0420
b) Simplify F = Π(1, 2, 3, 4)& realize using NAND & NOR gates.
a) Subtract 700 - 199 using 9's & 10’s complement.

24B81A0421
a) Simplify F(W, X, Y, Z) = Σ(0, 2, 5, 7, 8, 10)& realize using NAND & NOR gates.
b) Subtract 10111010 - 01010101 using 1's & 2’s complement.

24B81A0422
b) Find minimal SOP for F = Σ(1, 3, 9, 11, 13)& realize using NAND & NOR gates.
a) Subtract 11100000 - 01100101 using 1's & 2’s complement.

24B81A0423
a) Use K-Map: F = Σ(0, 1, 2, 8, 9)& realize using NAND & NOR gates.
b) Subtract 00011101 - 11101100 using 1's & 2’s complement.

24B81A0424
b) Derive SOP for F = Σ(3, 5, 7, 15)& realize using NAND & NOR gates.
a) Subtract 10000001 - 10000001 using 1's & 2’s complement.

24B81A0425
a) Minimize F = Σ(0, 4, 8, 12)& realize using NAND & NOR gates.
b) Subtract 01101010 - 10111011 using 1's & 2’s complement.

24B81A0426
b) Use K-Map for F = Σ(2, 3, 6, 7)& realize using NAND & NOR gates.
a) Subtract 00111000 - 00011100 using 1's & 2’s complement.

24B81A0427
a) Simplify F = Σ(0, 1, 5, 7, 13)& realize using NAND & NOR gates.
b) Subtract 11111111 - 10101010 using 1's & 2’s complement.

24B81A0428
b) Derive SOP for F = Σ(4, 5, 6, 7)& realize using NAND & NOR gates.
a) Subtract 10000000 - 01111111 using 1's & 2’s complement.

24B81A0429
a) Use K-Map: F = Σ(1, 3, 5, 7, 9)& realize using NAND & NOR gates.
b) Subtract 01000000 - 10000000 using 1's & 2’s complement.

24B81A0430
b) Simplify F = Σ(6, 7, 14, 15)& realize using NAND & NOR gates.
a) Subtract 11110000 - 11100000 using 1's & 2’s complement.

24B81A0431
a) Simplify F = Π(2, 3, 6, 7, 10)& realize using NAND & NOR gates.
b) Subtract 10110110 - 01010110 using 1's & 2’s complement.

24B81A0432
b) Minimize F = Π(0, 1, 4, 5, 8)& realize using NAND & NOR gates.
a) Subtract 11100000 - 11111111 using 1's & 2’s complement.

24B81A0433
a) Find POS for F = Π(1, 3, 5, 7)& realize using NAND & NOR gates.
b) Subtract 10000001 - 00000001 using 1's & 2’s complement.

24B81A0434
b) Derive POS form: F = Π(9, 11, 13, 15)& realize using NAND & NOR gates.
a) Subtract 01100011 - 00110011 using 1's & 2’s complement.

24B81A0435
a) Simplify F = Π(0, 2, 4, 6, 8)& realize using NAND & NOR gates.
b) Subtract 10101010 - 11111111 using 1's & 2’s complement.

24B81A0436
b) Use K-Map for F = Π(5, 6, 7, 8)& realize using NAND & NOR gates.
a) Subtract 00010001 - 00000001 using 1's & 2’s complement.

24B81A0437
a) Derive POS form: F = Π(0, 1, 2, 3)& realize using NAND & NOR gates.
b) Subtract 01010101 - 10101010 using 1's & 2’s complement.

24B81A0438
b) Minimize F = Π(8, 10, 12, 14)& realize using NAND & NOR gates.
a) Subtract 00000000 - 11111111 using 1's & 2’s complement.

24B81A0439
a) Use K-Map: F = Π(3, 6, 9, 12)& realize using NAND & NOR gates.
b) Subtract 11111111 - 00000000 using 1's & 2’s complement.

24B81A0440
b) Simplify F = Π(2, 4, 6, 8, 10)& realize using NAND & NOR gates.
a) Subtract 01010101 - 01010101 using 1’s & 2's complement

24B81A0441
a) F = Σ(1, 2, 5), d = (0, 3)& realize using NAND & NOR gates.
b) Subtract 765 - 432 using 7's & 8’s complement.

24B81A0442
b) F = Σ(0, 3, 4), d = (1, 5)& realize using NAND & NOR gates.
a) Subtract 700 - 777 using 7's & 8’s complement.

24B81A0444
a) F = Σ(2, 6), d = (0, 1, 3)& realize using NAND & NOR gates.
b) Subtract 123 - 456 using 7's & 8’s complement.

24B81A0446
b) F = Σ(4, 5), d = (2, 7)& realize using NAND & NOR gates.
a) Subtract 741 - 132 using 7's & 8’s complement.

24B81A0447
a) F = Σ(1, 3, 6), d = (0, 2)& realize using NAND & NOR gates.
b) Subtract 354 - 123 using 7's & 8’s complement.

24B81A0448
b) F = Σ(1, 5), d = (3, 4, 6)& realize using NAND & NOR gates.
a) Subtract 255 - 644 using 7's & 8’s complement.

24B81A0449
a) F = Σ(0, 4), d = (1, 5, 7)& realize using NAND & NOR gates.
b) Subtract 123 - 123 using 7's & 8’s complement.

24B81A0450
b) F = Σ(3, 5), d = (0, 2, 6)& realize using NAND & NOR gates.
a) Subtract 644 - 123 using 7's & 8’s complement.

24B81A0451
a) F = Σ(1, 7), d = (3, 4, 6)& realize using NAND & NOR gates.
b) Subtract 777 - 321 using 7's & 8’s complement.

24B81A0452
b) F = Σ(2, 6), d = (0, 1, 5)& realize using NAND & NOR gates.
a) Subtract 123 - 765 using 7's & 8’s complement.

24B81A0453
a) F = Σ(1, 3, 5, 7), d = (0, 2)& realize using NAND & NOR gates.
b) Subtract 456 - 321 using 7's & 8’s complement.

24B81A0454
b) F = Σ(4, 6, 8, 10), d = (5, 9)& realize using NAND & NOR gates.
a) Subtract 700 - 345 using 7's & 8’s complement.

24B81A0455
a) F = Σ(3, 7, 11, 15), d = (1, 2)& realize using NAND & NOR gates.
b) Subtract 654 - 321 using 7's & 8’s complement.

24B81A0456
b) F = Σ(1, 2, 8, 9), d = (0, 3, 10)& realize using NAND & NOR gates.
a) Subtract 123 - 456 using 7's & 8’s complement.

24B81A0457
a) F = Σ(0, 1, 4, 5), d = (2, 6)& realize using NAND & NOR gates.
b) Subtract 400 - 200 using 7's & 8’s complement.

24B81A0458
b) F = Σ(5, 6, 7, 13), d = (4, 12)& realize using NAND & NOR gates.
a) Subtract 777 - 777 using 7's & 8’s complement.

24B81A0459
a) F = Σ(3, 6, 9), d = (2, 10, 11)& realize using NAND & NOR gates.
b) Subtract 765 - 111 using 7's & 8’s complement.

24B81A0460
b) F = Σ(2, 5, 8), d = (0, 4, 12)& realize using NAND & NOR gates.
a) Subtract 567 - 210 using 7's & 8’s complement.

24B81A0461
a) F = Σ(1, 3, 7), d = (6, 14)& realize using NAND & NOR gates.
b) Subtract 111 - 222 using 7's & 8’s complement.

24B81A0462
b) F = Σ(0, 6, 10), d = (4, 8, 12)& realize using NAND & NOR gates.
a) Subtract 321 - 123 using 7's & 8’s complement.

24B81A0463
a) F = Σ(1, 3, 5, 7), d = (0, 2)& realize using NAND & NOR gates.
b) Subtract A2F - 3BC using 15's & 16’s complement.

24B81A0464
b) Derive SOP for F = Σ(4, 5, 6, 7)& realize using NAND & NOR gates.
a) Subtract FFF - 789 using 15's & 16’s complement.

24B81A0465
a) Use K-Map: F = Σ(1, 3, 5, 7, 9)& realize using NAND & NOR gates.
b) Subtract 456 - AAA using 15's & 16’s complement.

24B81A0466
b) Use K-Map to simplify F = Π(0, 2, 3, 7)& realize using NAND & NOR gates.
a) Subtract 999 - 111 using 15's & 16’s complement.

LE-1
a) Simplify using K-Map: F = Π(1, 4, 6)& realize using NAND & NOR gates.
b) Subtract ABC - DEF using 15's & 16’s complement.

LE-2
b) Use K-Map to simplify F = Σ(1, 2, 4, 7)& realize using NAND & NOR gates.
a) Subtract 123 - 456 using 15's & 16’s complement.

LE-3
a) Derive minimal SOP form for F = Σ(3, 5, 7)& realize using NAND & NOR gates.
b) Subtract CBA - 999 using 15's & 16’s complement.

LE-4
b) Use K-Map for F = Σ(2, 3, 6, 7)& realize using NAND & NOR gates.
a) Subtract 555 - 555 using 15's & 16’s complement.

LE-5
a) Simplify F = Σ(0, 1, 5, 7, 13)& realize using NAND & NOR gates.
b) Subtract FFE - 001 using 15's & 16’s complement.

LE-6
b) Find POS for F = Π(3, 5, 7)& realize using NAND & NOR gates.
a) Subtract AAA - BBB using 15’s & 16'scomplement.

LE-7
a) Find sop for F = Π(3, 5,6 7)& realize using NAND & NOR gates.
b) Subtract A9A - D07 using 15’s & 16'scomplement.

Saturday, July 12, 2025

VIDEO LECTURE STLD: UNIT-1

UNIT-1:
click here for Kmap practice questions

L1:Representation of numbers of different radix, conversion from one radix to another radix                                                                                                                              Click Here For   Video Lecture 1

L2:NUMBER CONVERSION, DECIMAL, OCTAL ,HEXADECIMAL, BINARY AND VICEVERSA                                                                                                                Click Here For   Video Lecture 2

L3:NUMBER CONVERSION AND INTRODUCTION TO COMPLIMENTS, 1'S AND 2'S COMPLIMENTS                                                                            Click Here For   Video Lecture 3  

L4:SUBTRACTION USING r's COMPLIMENTS, SUBTRACTION USING (r-1)'s COMPLIMENTS
                                                                                                        Click Here For   Video Lecture 4

L5:DECIMAL SUBTRACTION, BINARY SUBTRACTION, HEXADECIMAL SUBTRACTION
                                                                                                        Click Here For   Video Lecture 5

L6: BINARY CODES,8421,2421,84-2-1,EX-3,GRAYCODE
                                                                                                        Click Here For   Video Lecture 6


L7:ERROR DETECTING & CORRECTING CODES , HAMMING CODE

L8:LOGIC GATES, 2 I/P LOGIC GATES & 3 I/P LOGIC GATES
                                                                                                        Click Here For   Video Lecture 8

L9: LOGIC GATES IC 7400,IC 7402,IC 7404, IC 7408, IC 7486, IC 7432, IC 7410, IC 7420, IC 74266.
BOOLEAN ALGEBRA, BOOLEAN LAW, OR LAW, IDENTITY LAW, IDEMPOTENCE LAW
                                                                                                        Click Here For   Video Lecture 9

L10: BOOLEAN LAWS & THEOREMS
BOOLEAN LAWS & THEOREMS, DISTRIBUTIVE LAW, ABSORPTION LAW, SIMPLIFICATION THEOREM, TRANSPORTATION LAW, CONSENSUS THEOREM, DEMORGAN LAW
                                                                                                       Click Here For   Video Lecture 10

L11: REALISATION SOP AND POS USING UNIVERSAL GATES
                                                                                        Click Here For   Video Lecture 11

L12:  SIMPLIFICATION OF BOOLEAN EXPRESSION
                                                                                        Click Here For   Video Lecture 12


L13:SOP,POS,STANDARD SOP,STANDARD POS, MIN TERMS,MAXTREMS
                                                                                                      Click Here For   Video Lecture 13
L14: CANONICAL SOP & CANONICAL POS PROBLEMS 
                                                                                                    Click Here For   Video Lecture 14
L15: PROBLEM ON BOOLEAN ALGEBRA
                                                                                                    Click Here For   Video Lecture 15


https://ecelegend.blogspot.com/2025/07/k-map-practice-questions.html
every one must complete work 

Thursday, November 7, 2024

COMPARISON TREE

 

Difference between Full and Complete Binary Tree


A binary tree is a type of data structure where each node can only have two offspring at most named as “left” and “right” child.

A Binary Tree

There are different types of binary tree but here we are going to discuss about the difference of Complete binary tree and Full binary tree.

 Full Binary Tree:

A full binary tree is a binary tree in which all of the nodes have either 0 or 2 offspring. In other terms, a full binary tree is a binary tree in which all nodes, except the leaf nodes, have two offspring.

A Full Binary Tree

Let, i be the number of internal nodes
 n be the  total number of nodes
l be number of leaves
λ be number of levels

Then,

The number of leaves is (i + 1).
The total number of nodes is (2i + 1).
The number of internal nodes is (n – 1) / 2.
The number of leaves is (n + 1) / 2.
The total number of nodes is (2l – 1).
The number of internal nodes is (l – 1).
The number of leaves is at most (2λ – 1).

Complete Binary Tree:

A binary tree is said to be a complete binary tree if all its levels, except possibly the last level, have the maximum number of possible nodes, and all the nodes in the last level appear as far left as possible.

A Complete Binary Tree

There are 2 points that you can recognize from here,  

  1. The leftmost side of the leaf node must always be filled first.
  2. It isn’t necessary for the last leaf node to have a right sibling.

Check the following examples to understand the full and complete binary tree in a better way.

Example 1:

Neither complete nor full

  • Node C has just one child therefore, it is not a Full binary tree. 
  • Node C also has a right child but no left child, therefore it is also not a Complete binary tree. 

Hence, the binary tree shown above is neither complete nor full binary tree.

Example 2:

Full but not complete

  • All of the nodes have either 0 or 2 offspring, therefore, it is a Full binary tree. 
  • It is not a Complete binary tree because node B has no children whereas node C has children, and according to a complete binary tree, nodes should be filled from the left side.

Hence, the binary tree shown above is a Full binary tree and it is not a Complete binary tree.

Example 3:

Complete but not full

  • It is a complete binary tree as all the nodes are left filled.
  • Node B has just one child, therefore, it is not a full binary tree.

Hence, the binary tree shown above is a Complete binary tree and it is not a Full binary tree.

Example 4:

Complete and full

  • It is a Complete binary tree because all the nodes are left filled.
  • All of the nodes have either 0 or 2 offspring, therefore, it is a full binary tree.

Hence, the binary tree shown above is both a complete and a full binary tree.

S. No.Complete Binary TreeFull Binary Tree
1.In a complete binary tree, a node in the last level can have only one child.In a full binary tree, a node cannot have just one child.
2.In a complete binary tree, the node should be filled from the left to right.There is no order of filling nodes in a full binary tree.
3.Complete binary trees are mainly used in heap-based data structures.Full binary tree has no application as such but is also called a proper binary tree.
4.A complete binary tree is also called almost complete binary tree.A full binary tree also called  proper binary tree or 2-tree.

difference between B-tree and Binary tree:
S.NOB-treeBinary tree
1.In a B-tree, a node can have maximum ‘M'(‘M’ is the order of the tree) number of child nodes.While in binary tree, a node can have maximum two child nodes or sub-trees.
2.B-tree is called a sorted tree as its nodes are sorted in inorder traversal.While binary tree is not a sorted tree. It can be sorted in inorder, preorder, or postorder traversal.
3.B-tree has a height of log(M*N) (Where ‘M’ is the order of tree and N is the number of nodes).While binary tree has a height of log2(N) (Where N is the number of nodes).
4.B-Tree is performed when the data is loaded into the disk.Unlike B-tree, binary tree is performed when the data is loaded in the RAM(faster memory).
5.B-tree is used in DBMS(code indexing, etc).While binary tree is used in Huffman coding and Code optimization and many others.
6.To insert the data or key in B-tree is more complicated than a binary tree.While in binary tree, data insertion is not more complicated than B-tree.
7.B-tree is a self-balancing tree. The height of the tree is automatically adjusted on each update.A binary tree is not a self-balancing tree.


Comparison of Searching methods in Data Structures

the basic differences between two searching techniques, the sequential search and binary search.

Sequential SearchBinary Search
Time complexity is O(n)Time complexity is O(log n)
Finds the key present at first position in constant timeFinds the key present at center position in constant time
Sequence of elements in the container does not affect.The elements must be sorted in the container
Arrays and linked lists can be used to implement thisIt cannot be implemented directly into the linked list. We need to change the basic rules of the list to implement this
Algorithm is iterative in natureAlgorithm technique is Divide and Conquer.
Algorithm is easy to implement, and requires less amount of code.Algorithm is slightly complex. It takes more amount of code to implement.
N number of comparisons are required for worst case.Log n number of comparisons are sufficient in worst case.


Difference between Binary Search Tree and AVL Tree


Binary Search Tree:

A binary Search Tree is a node-based binary tree data structure that has the following properties:

  • The left subtree of a node contains only nodes with keys lesser than the node’s key.
  • The right subtree of a node contains only nodes with keys greater than the node’s key.
  • The left and right subtree each must also be a binary search tree.

Binary Search Tree

AVL Tree: 

AVL tree is a self-balancing Binary Search Tree (BST) where the difference between heights of left and right subtrees for any node cannot be more than one.

AVL Tree

Difference between Binary Search Tree and AVL Tree

Binary Search TreeAVL Tree
In Binary Search Tree, every node does not follow the balance factor.In AVL Tree, every node follows the balance factor i.e. 0, 1, -1.
Every Binary Search tree is not an AVL tree.Every AVL tree is a Binary Search tree.
Simple to implement.Complex to implement.
The height or depth of the tree is O(n).The height or depth of the tree is O(logn)
Searching is not efficient when there are a large number of nodes in the Binary Search tree. Searching is efficient because searching for the desired node is faster due to the balancing of height. 
The Binary Search tree structure consists of 3 fields left subtree, data, and right subtree. AVL tree structure consists of 4 fields left subtree, data, right subtree, and balancing factor.
It is not a balanced tree.It is a balanced tree.
In Binary Search tree. Insertion and deletion are easy because no rotations are required. In an AVL tree, Insertion and deletion are complex as it requires multiple rotations to balance the tree.

Red Black Tree vs AVL Tree

Red Black Tree: 

Red Black Tree

Properties:

  1. Self-Balancing is provided by painting each node with two colors(Red or Black).
  2. When the Tree is modified, a new tree is subsequently rearranged and repainted.
  3. It requires 1 bit of color information for each node in the tree.
  4. Time complexity: O(logn).

Constraints maintained by Red Black Tree:  

  1. Root is always black.
  2. All NULL leaves are black, and both children of a red node are black.
  3. Every simple path from a given node to any of its descendant leaves contains the same number of black 
    nodes.
  4. Path from root to farthest leaf is no more than twice as long as the path from the root to nearest leaf.
  5. Time complexity: O(logn).

AVL(Adelson-Velskii and Landis) Tree
 

Properties:  

  1. Height difference of the left and right subtree of the node should be less than 2.
  2. Re-balancing is done when the heights of two child subtrees of a node differ by more than one.
  3. Faster retrievals as strictly balanced.

Difference: 

Basis of comparisonRed Black TreesAVL Trees
LookupsRed Black Trees has fewer lookups because they are not strictly balanced.AVL trees provide faster lookups than Red-Black Trees because they are more strictly balanced.
ColourIn this, the color of the node is either Red or Black. In this, there is no color of the node.
Insertion and removalRed Black Trees provide faster insertion and removal operations than AVL trees as fewer rotations are done due to relatively relaxed balancing.AVL trees provide complex insertion and removal operations as more rotations are done due to relatively strict balancing.
StorageRed Black Tree requires only 1 bit of information per node. AVL trees store balance factors or heights with each node thus requiring storage for an integer per node.
SearchingIt does not provide efficient searching.It provides efficient searching.
UsesRed-Black Trees are used in most of the language libraries like map, multimap, multiset in C++, etc.AVL trees are used in databases where faster retrievals are required.
Balance FactorIt does not gave balance factorEach node has a balance factor whose value will be 1,0,-1
BalancingTake less processing for balancing i.e.; maximum two rotation requiredTake more processing for balancing










STLD QUESTION BANK

          MID-2 QUESTION BANK Unit-3 : 1.       Implement f(A,B,C,D) = ∑(0,1,3,5,6,8,9,11,12,13) using an 8:1 MUX and explain the procedu...