Posts

Showing posts from October, 2019

digital clock

Image
The date object is a built-in JavaScript object that enables you to conveniently work with date and times.You can create a date object anytime you need to store a date.Date object is  created using new keyword. birthday= new Date(); birthday= new Date("june 20,2002 08:00:00"); birthday=new Date("6,20,2002");   Setting Date values. setDate()   set the date of month; setMonth()  set the month, month number is 0 to 11; setFullYear()  set full year. setTime()   set the  time. setHours(),setMinutes(),setSeconds()   set the time. Getting date values. getDate()   get the date of month; getMonth()  get the month, month number is 0 to 11; getFullYear()  get full year. getTime()   get the  time. getHours(),getMinutes(),getSeconds()   get the time. <html>     <head>     <style>         #circle         {             display: none;             margin-top:100px;             height:200px;             width:200px;      

Karnaugh map(K-map)

Image
Conversion of Boolean fraction. A Boolean expression can have two types. *Sum of product.(SOP) *product of sum(POS)  In the SOP Boolean expression,different product terms are combined with the addition operators, While POS Boolean expression different sum terms are combined with the product operator.The product in SOP Boolean expression are called minterms, while sum term in POS boolean expression are called maxterm. Simplification of Boolean expression using K-MAP. K-map is a technique of simplify the Boolean  expression using graphical representation method. It simplifying the boolean expression by combining the similar expression and deleting the repeated variable. Input A Input B Output Y 0 0 0 0 1 1 1 0 0 1 1 1 The 0's and 1's written at the top of K-map represent the value of the input variable,A nad B. The value inside the K-Map represent the output Y.

Logic gate

Image
Logic gate A logic gate is an electronic switch which produces an electrical signal(representing 0 and 1) based one or more input signal using principal of Boolean logic such as AND, OR or NOT. Basic logic gate Basic logic gate are building block of digital circuit  that perform various logical operation such as AND,OR or NOT on binary input. there are following  basic logic gate. AND OR NOT AND gate The AND gate contains two input such as A and B and gives one output Y. In AND logic gate if both input is true then output is true otherwise false.     An AND logic gate can have one or more than inputs.  AND gate  expressed logically.                         Y=A.B Input A Input B Output Y(A.B) 0 0 0 0 1 0 1 0 0 1 1 1   The truth table of AND gate OR gate The OR gate contains two input such as A and B and gives one output Y.  The output of OR gate is true if any on

Level of tree, General tree and Binary tee

Image
Level of tree The level of tree is representes level of tree which must be started with zero. The level nuber of root node is zero. Height of tree The height of tree is equivalent to the maximum number of level+1. The height of tree=Level of tree+1 The  height of above tree is=3+1=4 General tree In this tree any node can have more than two child. Binary tree In binary tree each node can have maximum two children .In other words in case of binary tree any node consist of zero ,one or two children. Property of binary tree In binary tree each nod can have maximum two children. In binary tree total edges equivalent of number of (node-1).    Total edges= Number of node-1   Total edges=8-1=7     (see above figure binary tree)   In this tree maximum number of node are 2 h -1     where h= height of tree                Height of tree=level+1             =2+1   = 3 maximum number of node=   2 h -1                                     

What is tree?

Image
Tree It is a non linear data structure which ids used  to represent data in hierarchy format. Its main objective to implement hierarchy database in DBMS.In other word tree can be define as-                          It is a collection of vertices and edges. It is similar to graph but tree does not contain any cycle so we can say that all tree are graph but all graph are not tree. A tree is said to be a non cyclic graph because it does not contain any cycle. Tree Terminolgy Node:- An element of tree is called node.It is also called vertex. Parent node:- Those node that have child node called  child node. Child node:- Those node that have parent  node called child node. Leaf node:- Those node that have no any child node called leaf node.It is also  know as terminal node. Left subtree:- The entired node at left side area called left subtree. Right subtree:- The entired node at right side area called right subtree. Successor node:- Those node that c

Circular Queue

Image
Circular queue We know that  major drow back of linear queue is that we can not insert on the deleted position but in case of circular queue new element can be inserted on the deleted position in this case rear goes back to zero if rear is equivalent to size-1 . circular queue implementation through program. #include<stdio.h> #include<conio.h> #include<process.h> #include<stdlib.h> void cqinsert(); void cqdisplay(); void cqdelet(); int cqueue[50],front=-1,rear=-1,size;  int main()  {      int choice;      printf("enter the size of queue");          scanf("%d",&size);      do      {          system("cls");          printf("====SELECT YOUR CHOICE=====\n press 1 for insertinon-\n press 2 for display the element-\n press 3 for delete-----\n  enter choice=");          scanf("%d",&choice);          switch(choice)          {          case 1:             cqinsert(); break;