Books

30 Sept 2017

Algorithm

Algorithm

- a well-defined sequence of steps

Informally, an algorithm (in short, Algo) is any well-defined computational procedure that takes some value, or set of values, as input and produces some value, or set of values, as
output. An algorithm is thus a sequence of computational steps that transform the input into the output.

We can also view an algorithm as a tool for solving a well-specified computational problem.


For example, we might need to sort a sequence of numbers into non-decreasing
order.

Here is how we formally define the sorting problem:

Input: A sequence of n numbers (a₁, a₂,.........,aₙ).
Output: A permutation (reordering) (a'₁, a'₂, .... , a'ₙ) of the input sequence 
such that a'₁ ≤ a'₂ ≤ ..... ≤ a'ₙ.

For example, given the input sequence (31, 41, 59, 26, 41, 58), a sorting algorithm
returns as output the sequence (26, 31, 41, 41, 58, 59). Such an input sequence is called an instance of the sorting problem.


An algorithm is said to be correct if, for every input instance, it halts with the
correct output. We say that a correct algorithm solves the given computational
problem. An incorrect algorithm might not halt at all on some input instances, or it might halt with an incorrect answer.



What kinds of problems are solved by algorithms?

Some Problems are:

- The Human Genome Project has made great progress toward the goals of identifying
all the 100,000 genes in human DNA, determining the sequences of the 3 billion chemical base pairs that make up human DNA, storing this information in databases, and developing tools for data analysis. Each of these steps requires sophisticated algorithms.

The Internet enables people all around the world to quickly access and retrieve large amounts of information. With the aid of clever algorithms, sites on the Internet are able to manage and manipulate this large volume of data.

Electronic commerce enables goods and services to be negotiated and exchanged electronically, and it depends on the privacy of personal information such as credit card numbers, passwords, and bank statements. The core technologies used in electronic commerce include public-key cryptography and digital signatures, which are based on numerical algorithms and number theory.



Algorithms are at the core of most technologies used in contemporary
computers.
Furthermore, with the ever-increasing capacities of computers, we use them to solve larger problems than ever before. As we saw in the above comparison between insertion sort and merge sort, it is at larger problem sizes that the differences in efficiency between algorithms become particularly prominent. 
Having a solid base of algorithmic knowledge and technique is one characteristic that separates the truly skilled programmers from the novices. With modern computing technology, you can accomplish some tasks without knowing much about algorithms, but with a good background in algorithms, you can do much, much more.


29 Sept 2017

Floating Point Representation

What is Floating Point Representation?





- The term floating point is derived from the fact that there is no fixed number of digits before and after the decimal point; that is, the decimal point can float.

Or We can understand in another way,


Fixed-point number representations has a range that is sufficient for many scientific and engineering calculations. For convenience, we would like to have a binary number representation that can easily accommodate both very large integers and very small fractions. To do this, a computer must be able to represent numbers and operate

on them in such a way that the position of the binary point is variable and is automatically

adjusted as computation proceeds. In this case, the binary point is said to float, and the

numbers are called floating-point numbers.

For Example:
We have to show (6.5)₁₀  in binary number, It'll be (110.1)₂ . As in Scientific Notation,it'll be (1.101 x 2² )₂ .


We conclude that a binary floating-point number can be represented by:

• a sign for the number

• some significant bits

• a signed scale factor exponent for an implied base of 2

Note: When the binary point is placed to the right of the first significant bit, the
number is said to be normalized.(110.1)₂ normalized to (1.101 x 2² )₂ ]

In the above Example , (1.101 x 2² )₂  -
It have :
  • +ve sign,
  • 3 significant bits after decimal i.e., 101,(Mantissa)
  • a signed scale factor exponent i.e., 2² .(Exponent)
To store it in computer we use Floating Point Representation:

The IEEE standard specify two types of Floating Point Representation:
1) Single Precision (32 Bit standard representation)
2) Double Precision (64 bit standard representation)





Note: Instead of the actual signed exponent, E, the value stored in the exponent field is an unsigned integer
 E= E + 127. This is called the excess-127 format. Thus, E is in the range 0 ≤ E ≤ 255.
This means that the actual exponent, E, is in the range −126 ≤ E ≤ 127. The use of the excess-127 representation for exponents simplifies comparison of the relative sizes of two floating-point numbers.
The scale factor has a range of 2⁻¹²⁶ to 2⁺¹²⁷,(approximately 10 E±38). The 24-bit mantissa provides approximately the same precision as a 7-digit decimal value.





Note: The double-precision format has increased exponent and mantissa ranges. The 11-bit excess-1023 exponent E has the range 1 ≤ E ≤ 2046 for normal values, with 0 and 2047 used to indicate special values,
as before. Thus, the actual exponent E is in the range −1022 ≤ E ≤ 1023, providing scale factors of 2⁻¹⁰²² to 2¹⁰²³,(approximately 10 E±308).. The 53-bit mantissa provides a precision equivalent to about 16 decimal digits.


Example of Normalisation (Single Precision):





Example of Single Precision Floating-Point Number:



Here in above example, the exponent (00101000)₂ = 40 and excess-127 is 40-127= -87, (inversely -87+127=40 ).


Note: When E = 0 and the mantissa fraction M is zero, the value 0 is represented. 
When E=  255 and M = 0, the value ∞ is represented, where ∞ is the result of dividing a normal number by zero. The sign bit is still used in these representations, so there are representations for ±0 and ±∞.
When E= 0 and M ≠ 0, denormal numbers are represented. Their value is ±0.M × 2⁻¹²⁶.
When E = 255 and M ≠ 0, the value represented is called Not a Number (NaN). A NaN represents the result of performing an invalid operation such as 0/0 or −1.


IEEE STANDARDS for Floating-Point Numbers:

signexponentmantissaexponentsignificant
formatbitbitsbitsexcessdigits
Our 8-bit14371
Our 16-bit169313
IEEE 32-bit18231276
IEEE 64-bit111521,02315
IEEE 128-bit11511216,38334





8 Jun 2017

What is Arduino?

What is Arduino?

- It is a software and hardware company, user community which manufactures and designs micro-controller kit for building digital devices and interactive objects that can sense and control objects.

Arduino_logo
Arduino Logo
 Arduino is an open-source electronics platform based on easy-to-use hardware and software. Arduino boards are able to read inputs - light on a sensor, a finger on a button, or a Twitter message - and turn it into an output - activating a motor, turning on an LED, publishing something online.The hardware consists of an open-source hardware board designed around an 8-bit Atmel AVR microcontroller, or a 32-bit Atmel ARM. It also comes in different variant such as Arduino Uno, Arduino Nano
Arduino UNO Board

  It helps to make small projects for students or beginners.

  Types Of Arduino Boards

  Arduino Types:


ProcessorAnalogue I/O
Arduino Uno16Mhz ATmega328  6 input, 0 output
Arduino Due84MHz AT91SAM3X8E 12 input, 2 output
Arduino Mega16MHz ATmega2560 16 input, 0 output
Arduino Leonardo16MHz ATmega32u4 12 input, 0 output




 Here, a short list of projecrts is provided which can be implement by Arduino board.


8 Mar 2017

What is Blu-Ray?

What is Blu-Ray?

Blu-ray, also known as Blu-ray Disc (BD) is the name of a next generation optical disc format jointly developed by the Blu-ray Disc Association (BDA) used to store media and PC content.

BDA is a group of leading consumer electronics and PC companies. It has more than 180 members across world.

Its Board of Directors currently consist of:
Apple, Dell, Hitachi, HP, LG, Matsushita, Mitsubishi, Pioneer, Philips, Samsung, Sharp, Sony, Sun Microsystem(Oracle), TDK, Thomson, Twentieth Century Fox, Walt Disney and Warner Bros

                                                  Logo of Blu-Ray Disc



 High-definition video may be stored on Blu-ray discs with up to 2160p resolution (3840×2160 pixels), at up to 60 frames per second. DVD discs had been limited to a maximum resolution of 480i (NTSC, 720×480 pixels) or 576i (PAL, 720×576 pixels).



Sony unveiled the first Blu-ray disc prototypes in October 2000, and the first prototype player was released in April 2003 in Japan.

Each Blu-ray disc is about 1.2 millimetres thick and 12 cm in diameter.
BLU-RAY has pits that are only 0.15 microns (µm) long. This is more than twice as small as the pits on a DVD.
Blu-ray has track pitch of 0.32 microns than 0.74 microns of DVD.



Discs store digitally encoded video and audio information in pits, spiral grooves that run from the centre of the disc to the edges.
A laser reads the other side of these pits -- the bumps.
Blu-ray uses a blue laser of shorter wavelength (405 nanometres) than a red laser (650 nanometres).


There are three Format of Blu-Ray is available: 
  • BD-ROM - Read-only format for software, games and movie distribution.

  • BD-R - Recordable format for HDTV recording and PC data storage.

  • BD-RE - Rewritable format for HDTV recording and PC data storage.

 

Advantages of Blu-Ray:
  • Record high-definition television (HDTV) without any quality loss.
  • Instantly skip to any spot on the disc.
  • Record one program while watching another on the disc.
  • Create playlists.
  • Automatically search for an empty space on the disc to avoid recording over a program.
  • Blu-ray discs are better armed than current DVDs. They come equipped with a secure encryption system -- a unique ID that protects against video piracy and copyright infringement.
  • Blu-ray has a higher data transfer rate -- 36 Mbps.
  • Do not have the problems of  birefringence and disc tilt. 






 

3 Mar 2017

What is LI-FI?

What is LI-FI?

Li-FI stands for Light-Fidelity 100x faster than Wireless-Fidelity abbreviated as WI-FI.

 Visible Light Communication (VLC) is another term that is sometimes used for this technology.


This is first introduced by Harald Haas at his TED Global Talk and name this idea as "LI-FI".He is Chairman of Mobile Communications at the University of Edinburgh and co-founder of pureLiFi.
It is wire and UV visible-light communication or infrared and near-ultraviolet instead of radio-frequency spectrum, part of optical wireless communications technology, which carries much more information and has been proposed as a solution to the RF-bandwidth limitations.



Visible light communications (VLC) works by switching the current to the LEDs off and on at a very high rate, too quick to be noticed by the human eye. Although Li-Fi LEDs would have to be kept on to transmit data, they could be dimmed to below human visibility while still emitting enough light to carry data. The light waves cannot penetrate walls which makes a much shorter range, though more secure from hacking, relative to Wi-Fi. Direct line of sight is not necessary for Li-Fi to transmit a signal; light reflected off the walls can achieve 70 Mbit/s.


The first VLC smartphone prototype was presented at the Consumer Electronics Show in Las Vegas from January 7–10 in 2014. The phone uses SunPartner's Wysips CONNECT, a technique that converts light waves into usable energy, making the phone capable of receiving and decoding signals without drawing on its battery.

                       A picture of Office Automation through LI-Fi

1 Feb 2017

What is Pico Projector?

What is Pico Projector?

 

A pico projector is a small device to project a screen at size of 60'' or more same as large projector. Actually, we can say that it is mobile projector because we can project at anywhere but in dark environment such as bedroom with no light or dim light, dining room with low light, presentation hall etc. But as compared to High-Definition projector, it has low quality because of low luminance.
handheld projector (also known as a pocket projectormobile projectorpico projector or mini beamer) is technology that applies the use of an image projector in a handheld device.



                                You can see above picture of Pico Projector.

The system comprises five main parts: the battery, the electronics, the laser or LED light sources, the combiner optic, and in some cases, scanning mirrors. First, the electronics system turns the image into an electronic signal. Next, the electronic signals drive laser or LED light sources with different colors and intensities down different paths. In the combiner optic, the different light paths are combined into one path, defining a palette of colors.


                   
                                       This is picture of HD 3D projector
 

Featured post

Dynamic Programming

What is Dynamic Programming?   - Dynamic programming (also known as dynamic optimization) is a method for solving a complex problem ...