Skip to main content

Posts

Decimal Number to Binary Number

A Binary Number consists of  0 s & 1 s only (Two Digits)   whereas a  Decimal Number Consists of 0,1,2,3,4,5,6,7,8,9 (ten digits) .                   For Example ( 111 )2 is binary number equivalent to decimal number ( 7 )10.  A bit is a single Binary Digit. The binary number above has three bits. Algorithm Divide the dividend(number) by divisor 2 and get the remainder & the quotient. If the quotient is not zero, then quotient becomes dividend and follow above step. As quotient has now become zero, the binary number is all the remainders from bottom or from right side which consists of 0 & 1. Flowchart To see the working of above Flowchart Click here to watch it on YouTube
Recent posts

Perfect Number

                    A Perfect number is a number that is equal to sum of its all positive divisors excluding the number itself.                         For  example 6 is a perfect number.      Sum of its divisor is equal to the number.                                   1+2+3=6                                               FLOWCHART          To see the working of Perfect Number Flowchart Click here to Watch on YouTube Learn to write a program in C to find whether a given number is perfect number or not. Click here to Watch on YouTube

Bubble Sort

               Bubble Sort is a sorting algorithm that works by comparing each pair of adjacent items and swapping them if they are in wrong order repeatedly till the list is sorted.               Bubble sort is also referred to as sinking sort or comparison sort . The algorithm is named for the way smaller or larger elements “bubble“ to the top of the list.              Bubble sort algorithm is the simplest algorithm for sorting but it is too slow and impractical for most problems. Bubble Sort Algorithm Step 1: Enter how many numbers(n) to sort. Step2: Enter all numbers and store it in array a[]. Step3: Make a key starting with second element of an array a[]. Step4: Now compare the [key-1] element of an array a[] with [key] element of an array a[]. Step5: For ascending order if the [key-1] element of an array a[] is greater than [key] element of an array a[] then swap the respective elements of an array a[]. Step6:Move the key to right to next element

Armstrong Number

            An Armstrong number is an  n -digit number that is equal to the sum of the  n th  powers of its digits. For example 153 is an Armstrong Number in 3 digit number 1 3  +  5 3  +  3 3   =  153 1  +125+27  =153 1634 is an Armstrong Number in 4 digit number 1 4  + 6 4  + 3 4  + 4 4  =  1634 1+1296+81+256=1634 And so numbers from 0-9 all are Armstrong Numbers as  0 1 is 0 , 1 1   is 1,   2 1 is 2 , 3 1 is 3 and so on..   Armstrong Algorithm Step1: Read a number.  Step2:  Store all the digits of a number in an array digits[] Step3:  Count all the digits of a number and store in variable   length Step4:  Start a loop till  the length of a number Step5: Raise each digit to a power equal to the number of digits in the number. For ex, each digit of a three‑digit number would be raised to the third power; each digit of a Seven‑digit number would be raised to the Seventh power; and so on Step6: Add the results to variable  sum

Multiplication Tables

                        Learn the Multiplication Tables                                                                                 Learn how to write the Program in C to generate the Multiplication Table of any number. Click here to watch on YouTube Learn how to  make  the Multiplication Table App in          MIT App Inventor Click here to watch on YouTube Download the Multiplication Table Android App here Multiplication Table App

Reverse Fibonacci Sequence

Fibonacci sequence works well below zero too. Here is the sequence -8,5,-3,2,-1,1,0,1,1,2,3,5,8,13,… T he sequence below zero has the same numbers as the sequence above zero,  except they follow a +-+- ... pattern. To see the working of Reverse Fibonacci Sequence Flowchart,                                     Click here to watch on YouTube To write the program in C,                            Click here to Watch on YouTube

Factorial of a Number

       FACTORIAL   !   The factorial of a positive integer n , denoted by n! , is the product of all positive integers less than or equal to 1.     For example the factorial of 6 is 6! = 6*5*4*3*2*1 = 720 The value of 0! is 1 , according to the convention for an empty product. We can calculate a factorial of a number(n)  from the previous one i.e. by multiplying the number (n)  to a factorial of number(n-1) . n! = n * (n-1)! For example: 5! = 5*4*3*2*1 = 120 . So calculate the factorial of 6 by above rule. 6! = 6 * (6-1)! = 6 * 5!= 6 * 120 = 720 7! = 7 * (7-1)! = 7 * 6!= 7 * 720 = 5040 To see the working of flowchart,  Click here to watch on YouTube To write the program in C,  Click here to watch on YouTube To Create the Factorial App in MIT App Inventor  Click here to watch on YouTube Download the Factorial Android App here Factorial Android App