Sunday 24 July 2016

Difference between hardware and software


Difference between hardware and 


software




The main difference between hardware and software are as follows:

Hardware
  1. Physical parts of the computer are called hardware.
  2. You can touch, see and feel hardware.
  3. Hardware is constructed using physical materials or components.
  4. Computer is hardware, which operates under the control of a software.
  5. If hardware is damaged, it is replaced with new one.
  6. Hardware is not affected by computer viruses.
  7. Hardware cannot be transferred from one place to another electronically through network.
  8. User cannot make new duplicate copies of the hardware.
Software
  1. A set of instructions given to the computer is called software.
  2. You cannot touch and feel software.
  3. Software is developed by writing instructions in programming language.
  4. The operations of computer are controlled through software.
  5. If software is damaged or corrupted, its backup copy can be reinstalled.
  6. Software is affected by computer viruses.
  7. Software can be transferred from one lace to another electronically through network.
  8. User can make many new duplicate copies of the software.







Tuesday 19 July 2016

Distributed Database

Distributed Database

A distributed database (DDB) is a collection of multiple,logically interrelated databases distributed over a computer network. A distributed database management system (D–DBMS) is the software that manages the DDB and provides an access mechanism that makes this distribution transparent to the users.

Distributed database system (DDBS) = DDB + D–DBMS


What is not a DDBS?

A timesharing computer system

A loosely or tightly coupled multiprocessor
system

A database system which resides at one of the
nodes of a network of computers - this is a
centralized database on a network node

Saturday 16 July 2016

Arithmetic and Logic Unit

AIRTHEMATIC AND LOGIC (ALU):


DEFINITION:


In digital electronics, an arithmetic logic unit(An arithmetic logic unit (ALU) represents the fundamental building block of the central processing unit of a computer. An ALU is a digital circuit used to perform arithmetic and logic operations.) is a digital circuit that performs integer arithmetic and logical operations. The ALU is a fundamental building block of the central processing unit of a computer, and even the simplest microprocessors contain one for purposes  Short for Arithmetic Logic Unit, ALUIn some computer processors, the ALU is divided into an AU and LU. The AU performs the arithmetic operations and the LU performs the logical operations.

Machine cycle


An arithmetic logic unit (ALU) is a digital circuit used to perform arithmetic and logic operations. It represents the fundamental building block of the central processing unit (CPU) of a computer. Modern CPUs contain very powerful and complex ALUs. In addition to ALUs, modern CPUs contain acontrol unit (CU). Most of the operations of a CPU are performed by one or more ALUs, which load data from input registers. A register is a small amount of storage available as part of a CPU. The control unit tells the ALU what operation to perform on that data and the ALU stores the result in an output register. The control unit moves the data between these registers, the ALU and memory.How An ALU WorksAn ALU performs basic arithmetic and logic operations. Examples of arithmetic operations are addition, subtraction, multiplication, and division. Examples of logic operations are comparisons of values such as NOT, AND, and OR.All information in a computer is stored and manipulated in the form of binary numbers, i.e. 0 and 1.Transistor switches are used to manipulate binary numbers, since there are only two possible states of a switch: open or closed. An open transistor, through which there is no current, represents a 0. A closed transistor, through which there is a current, represents a 1. Operations can be accomplished by connecting multiple transistors. One transistor can be used to control a second one, in effect turning the transistor switch on or off depending on the state of the second transistor. This is referred to as a gate, because the arrangement can be used to allow or stop a current.The simplest type of operation is a NOT gate. This uses only a single transistor. It uses a single input and produces a single output, which is always the opposite of the input. The figure below shows the logic of the NOT gate.alu not gateOther gates consist of multiple transistors and use two inputs. The OR gate results in a 1 if either the first or the second input is a 1. The OR gate only results in a 0 if both inputs are 0. The figure below shows the logic of the OR gate.alu or gate 

The AND gate results in a 1 only if both the first and second input are 1s. The figure below shows the logic of the AND gate.


alu and gate
The XOR gate results in a 0 if both the inputs are 0 or if both are 1. Otherwise, the result is a 1. The figure below shows the logic of the XOR gate.alu xor gate

The various gates sound a little abstract, but remember that a computer only processes binary data. When you follow the binary logic of these operations, you are starting to think like a computer. 

Thursday 31 March 2016

argc and argv


So far, all the programs we have written can be run with a single command. For example, if we compile an executable called myprog, we can run it from within the same directory with the following command at the GNU/Linux command line: 
./myprog
gcc -o myprog myprog.c
#include <stdio.h>
int main()
{
return 0;
}
#include <stdio.h>
int main (int argc, char *argv[])
{
return 0;
}
gcc -o myprog myprog.c
argc
4
argv[0]
gcc
argv[1]
-o
argv[2]
myprog
argv[3]
myprog.c
#include <stdio.h>
int main (int argc, char *argv[])
{
int count;
printf ("This program was called with \"%s\".\n",argv[0]);
if (argc > 1)
{
for (count = 1; count < argc; count++)
{
printf("argv[%d] = %s\n", count, argv[count]);
}
}
else
{
printf("The command had no other arguments.\n");
}
return 0;
}
This program was called with "./fubar".
argv[1] = a
argv[2] = b
argv[3] = c

However, what if you want to pass information from the command line to the program you are running? Consider a more complex program like GCC. To compile the hypothetical myprog executable, we type something like the following at the command line: 
The character strings -omyprog, and myprog.c are all arguments to the gcc command. (Technically gcc is an argument as well, as we shall see.)
Command-line arguments are very useful. After all, C functions wouldn't be very useful if you couldn't ever pass arguments to them -- adding the ability to pass arguments to programs makes them that much more useful. In fact, all the arguments you pass on the command line end up as arguments to the main function in your program.
Up until now, the skeletons we have used for our C programs have looked something like this: 
From now on, our examples may look a bit more like this: 
As you can see, main now has arguments. The name of the variable argc stands for "argument count"; argc contains the number of arguments passed to the program. The name of the variable argv stands for "argument vector". A vector is a one-dimensional array, and argv is a one-dimensional array of strings. Each string is one of the arguments that was passed to the program.
For example, the command line 
would result in the following values internal to GCC:
As you can see, the first argument (argv[0]) is the name by which the program was called, in this case gcc. Thus, there will always be at least one argument to a program, and argc will always be at least 1.
The following program accepts any number of command-line arguments and prints them out: 
If you name your executable fubar, and call it with the command ./fubar a b c, it will print out the following text: 

Wednesday 23 September 2015

SMART Notebook® Maestro Quick Start Guide

SMART Notebook® Maestro Quick Start Guide 


This guide will help you get started with SMART Notebook Maestro so you can immediately experience the power of interacting and integrating content from your SMART Notebook app for iPad with your SMART Notebook software. In this guide there are resources to help users: - Understand the requirements to use SMART Notebook Maestro - Access essential downloads to use SMART Notebook Maestro - Get started with SMART Notebook Maestro - Contact technical support with questions  


About SMART Notebook Maestro 



The SMART Notebook Maestro collaborative learning software is the latest addition to the SMART Notebook software platform. The SMART Notebook Maestro add-on connects SMART Notebook software and the SMART Notebook iPad app. Once connected, it enables teachers to: - Quickly connect SMART Notebook app for iPad via Wi-Fi with the SMART Notebook software - Remotely control and interact with content from either your SMART interactive solution or from your SMART Notebook app for iPad - Write, add and manipulate objects on the SMART Notebook app for iPad and have it appear on your display in the SMART Notebook software



SMART Notebook Maestro Requirement
 SMART Notebook Advantage 

SMART Notebook Maestro requires an active SMART Notebook Advantage subscription. A SMART Notebook Advantage license key may be purchased from your authorized reseller. To download SMART Notebook collaborative learning software (requires SMART Notebook 14.2 or later) access:



SMART Notebook app for iPad 



SMART Notebook Maestro requires the use of the SMART Notebook app for iPad. The SMART Notebook app for iPad is a light version of the SMART Notebook software that allows you to create multimedia files, complete assignments and share work. The iPad app can be downloaded at the App Store by searching the keywords SMART Notebook. Note: The iPad app may be purchased individually or in bulk using Apple’s Education Volume Purchase Program (must be an education customer and requires a minimum purchase of 20 to qualify). 



SMART Notebook Maestro


 The SMART Notebook Maestro add-on may be downloaded from SMART by navigating to 
  http://info.smarttech.com/20141031-Notebook-Maestro-Download_Landing-Page.html 



Getting Started with SMART Notebook Maestro



To enable Maestro for use in the SMART Notebook software your iPad and computer must be on the same Wi-Fi network. 

1. After downloading the SMART Notebook Maestro add-on, install the add-on by double selecting the download. Then select OK to continue and then Done to close the window. 

2. Press the Add-ons tab in SMART Notebook. Select Notebook Maestro and then press Enable Maestro. 

3. Restart SMART Notebook software. Important: You must restart SMART Notebook software to enable the connection. 

4. Tap Connect to SMART Notebook software in the SMART Notebook for iPad app, and then follow the pop-up instructions in the iPad app to complete the connection process. Note: Use the SMART Notebook app for iPad to scan the QR code in the SMART Notebook Maestro add-on tab to enable the connection. 


C++ Operator Precedence

C++ Operator Precedence



The following table lists the precedence and associativity of C++ operators. Operators are listed top to bottom, in descending precedence.
PrecedenceOperatorDescriptionAssociativity
1::Scope resolutionLeft-to-right
2++   --Suffix/postfix increment and decrement
type()   type{}Functional cast
()Function call
[]Subscript
.   ->Member access
3++   --Prefix increment and decrementRight-to-left
+   -Unary plus and minus
!   ~Logical NOT and bitwise NOT
(type)C-style cast
*Indirection (dereference)
&Address-of
sizeofSize-of[note 1]
new   new[]Dynamic memory allocation
delete   delete[]Dynamic memory deallocation
4.*   ->*Pointer-to-memberLeft-to-right
5*   /   %Multiplication, division, and remainder
6+   -Addition and subtraction
7<<   >>Bitwise left shift and right shift
8<   <=For relational operators < and ≤ respectively
>   >=For relational operators > and ≥ respectively
9==   !=For relational operators = and ≠ respectively
10&Bitwise AND
11^Bitwise XOR (exclusive or)
12|Bitwise OR (inclusive or)
13&&Logical AND
14||Logical OR
15?:Ternary conditional[note 2]Right-to-left
throwthrow operator
=Direct assignment (provided by default for C++ classes)
+=   -=Compound assignment by sum and difference
*=   /=   %=Compound assignment by product, quotient, and remainder
<<=   >>=Compound assignment by bitwise left shift and right shift
&=   ^=   |=Compound assignment by bitwise AND, XOR, and OR
16,CommaLeft-to-right
  1.  The operand of sizeof can't be a C-style type cast: the expression sizeof (int) * p is unambiguously interpreted as(sizeof(int)) * p, but not sizeof((int)*p).
  2.  The expression in the middle of the conditional operator (between ? and :) is parsed as if parenthesized: its precedence relative to ?: is ignored.
When parsing an expression, an operator which is listed on some row of the table above with a precedence will be bound tighter (as if by parentheses) to its arguments than any operator that is listed on a row further below it with a lower precedence. For example, the expressions std::cout << a & b and *p++ are parsed as (std::cout << a) & b and *(p++), and not as std::cout << (& b) or (*p)++.
Operators that have the same precedence are bound to their arguments in the direction of their associativity. For example, the expression = b = c is parsed as = (= c), and not as (= b) = c because of right-to-left associativity of assignment, but + b - c is parsed (+ b) - c and not + (- c) because of left-to-right associativity of addition and subtraction.
Associativity specification is redundant for unary operators and is only shown for completeness: unary prefix operators always associate right-to-left (delete ++*p is delete(++(*p))) and unary postfix operators always associate left-to-right (a[1][2]++ is ((a[1])[2])++). Note that the associativity is meaningful for member access operators, even though they are grouped with unary postfix operators: a.b++ is parsed (a.b)++ and not a.(b++))
Operator precedence is unaffected by operator overloading.

Precedence And Assosiativity



Precedence and associativity are compile-time concepts and are independent from order of evaluation, which is a runtime concept.
The standard itself doesn't specify precedence levels. They are derived from the grammar.
const_caststatic_castdynamic_castreinterpret_casttypeidsizeof...noexcept and alignof are not included since they are never ambiguous.
Some of the operators have alternate spellings (e.g., and for &&or for ||not for !, etc.).
Relative precedence of the ternary conditional and assignment operators differs between C and C++: in C, assignment is not allowed on the right-hand side of a ternary conditional operator, so = a < d ? a++ : a = dcannot be parsed. Many C compilers use a modified grammar where ?: has higher precedence than =, which parses that as = ( ((< d) ? (a++) : a) = d ) (which then fails to compile because ?: is never lvalue in C and =requires lvalue on the left). In C++, ?: and = have equal precedence and group right-to-left, so that = a < d ? a++ : a = d parses as = ((< d) ? (a++) : (= d)).



Common operators
assignmentincrementdecrementarithmeticlogicalcomparisonmemberaccessother
= b+= b-= b*= b/= b%= b&= b|= b^= b<<= b>>= b
++a--aa++a--
+a-a+ b- b* b/ b% b~a& b| b^ b<< b>> b
!a&& b|| b
== b!= b< b> b<= b>= b
a[b]*a&aa->ba.ba->*ba.*b
a(...)a, b? :
Special operators
static_cast converts one type to another related type 
dynamic_cast converts within inheritance hierarchies
const_cast adds or removes cv qualifiers
reinterpret_cast converts type to unrelated type
C-style cast converts one type to another by a mix of static_castconst_cast, and reinterpret_cast
new allocates memory
delete deallocates memory
sizeof queries the size of a type
sizeof... queries the size of a parameter pack (since C++11)typeid queries the type information of a type
noexcept checks if an expression can throw an exception (since C++11)alignof queries alignment requirements of a type (since C++11)