Tuesday, August 31, 2010

Protest Done...Success 50%


As stated in my previous blog about the protest for Class Room Change..some of us gathered in front of our HOD and told him about the problems we are facing due to delay in the procedures. Sir, was very generous to us and told us that he will contact the persons who are responsible for making the change once again and immediate changes will take place. He also told us about the Seminar room as a temporary alternative but it had very few seating capacity to hold our strength. Also, he spoke about implementing two exhaust fans, but that would take time too..Lets see what Happens next......

Monday, August 30, 2010

Get well soon ATANU!!


Our friend Atanu Patra is suffering from Jondis.


We wish him a quick recovery and get back soon to the class.

GET WELL SOON!!

Lets Protest!!


Lets Protest NOW!!
===================

I needed a platform to say these few important things and HERE I GO!!


THE TOPIC IS NOT A JOKE!!


For how much long we have to wait till we get a new classroom. The class is creating lots of problem for us both physically and mentally. Improper ventilation is causing suphocation. There are only three ways for the air to get out of the room. One door and two windows.
No teacher wants to keep the door open as it creates lots of disturbances. The window (Actually its a quarter window) beside the stairs does not seem to be pleasing the teachers either. So only one (HALF) window for the air to evacuate.

Application sent last week. No news of any solid decisions heard. So we have to wait for how much long....1 week...2 week..a month..or a damm semester.

This way it wont do.

Believe me those teachers wont do anything for us until they feel what we are undergoing. We have to protest against this and that too quickly.....

What are our choices, How can we protest:

1. Everybody should go to the Director's or HOD's room and ask for immediate changes.
2. Do a SAFEBUNK

Defination of SAFE-BUNK
=========================

Inventors: Few boys of IT 3rd years

Safe Bunk is an appropriate alternative to the usual MASS-BUNK, where we inform the teachers about the BUNK and GIVE OUR ATTENDENCE to all the respected teachers who were scheduled to take the class on that day.



3. Exchange the Faculty room with our class room. ;-)


ITS NOW OR NEVER.....lets do it NOW!!

SAFE BUNK!!


Defination of SAFE-BUNK??
=========================



Inventors: Few boys of IT 3rd years

Safe Bunk is an appropriate alternative to the usual MASS-BUNK, where we inform the teachers about the BUNK and GIVE OUR ATTENDENCE to all the respected teachers who were scheduled to take the class on that day.

Ain't that a cool invention??

Sunday, August 29, 2010

Learn Linux from Scratch


First things First
==============

  • Linux is not completely free (some Linux Distros)
  • One OS many communities/Organisations Unlike Windows by Microsoft
  • Linux provides more security compared to windows
  • more will follow.....
Comming to Linux
================

  • Linux starts with "/". So location of any file will start from / , unlike windows where you have paths like C:\xyz\asd\abc
  • Swap refers similar to RAM. Optimal size of Swap Partition should be Twice of RAM
  • You cannot execute .exe files directly using Linux. However you may do that by using some third party softwares like WINE.
  • Linux is case sensitive.

Some commands
=============
pwd - present working directory
bc - calculator

for calculating floats in bc calculator.
Enter the line scale=1 (1,2,3......refers to the no. of places after decimal)


Going somewhere
===============
  • cd - it goes to the path you enter in
  • .. means one step backward. example: cd ..
  • . represents current directory
  • Here you need to know two things: Absolute path and Relative path
Suppose u are in a directory A (Which is in /)which has another sub-directory under the Name B. If you are in B and you need to go to B.Then you can follow two ways.

1. Absolute path(Complete path mentioned): cd /A
2. Relative Path: cd ..

Listing the Contents:
==================
  • ls - lists the contents of a directory.
  • use ls -l to view the permission of the contents along with links and ownerships.
File creation:
===========
  • touch - creates an empty file
  • cat > - you can enter some text in the file. Then press Ctrl+D to save.
  • vi or simply vi
It will open up a text editor where you can insert some text by going to the insert mode.
For going to the insert mode... press "I"
After writing press "Esc" (escape)
Then if you want to:

quit without saving then press: :q
Save and quit: :wq

-->for creation of hidden files use "." in front of the file name. Say like....
cat > .debraj

-->cat > cannot be used to modify an old file rather vi should be used

Directory Creation:
=================


mkdir (directory_name)

Creates a directory.


For creating multiple directory within the same location

mkdir a b c

Multiple directories in different locations

mkdir a a/b a/b/c a/d

it will create directories a,
directory b under a,
directory c under b,
Directory d under a.

you can also use relative path here....like


mkdir . ./b ./b/c ./d


Read a file
=========

cat (filename)



Copying a file
===========


cp (sourcefilename) (destinationfilename)

The above code should be used if the source file is in current directory.
else

cp (full or relative path of source) (full or relative path of destination)


Moving a file
============
mv (sourcefilename) (destinationfilename)

use the above technique if you are in the source file's Directory. Else do as in case of the last command.

Move command can also be used to rename a file.



Check Out the all new Download Zone

I have decided to include a new page named as Download Zone where you all can download some cool stuffs.

Recently I have uploaded a few Java Programs please click on the icon given there and download the Programs.....

HAVE A LOOK!! ;-)


Microprocessors and Microcontrollers: Timing Diagram

T - State
=========
One sub-division of the operation performed in one clok period is called one T-state.

Machine Cycle
==============
The time required to complete one operation of accessing either memory or i/o is called one machine cycle. The machine cycle may consist of 3 to 6 T-state.

Instruction Cycle
================
The time required to complete the execution of an instruction. An instruction cycle may consist of 1 to 5 machine cycles.



Remember this:
===========

S1 | S0 | Process

-----------------------

0 | 0 | Halt

0 | 1 | Write

1 | 0 | Read

1 | 1 | Opcode fetch


First we need to know the Machine Cycles of 8085

Opcode fetch
============
  • This cycle requires 4 T-states.
  • 1st T state ALE is high, lower byte of address from PC(Program Counter) is placed on the multiplexed data/address bus.
  • after checking the status of READY pin, RD(bar) goes low the opcode is placed on the data bus, This state continues in the 3rd T-State.
  • The fourth T-state is used to decode the instruction and to generate the relevant control signals. The state of the address bus is unspecified( This T-state is used by some DMA controllers to transfer data in hidden/transperant mode)
  • IO/M(bar)= 0
  • S1=1 S0=1


Memory Read (for 1 byte)
====================

  • Three T states, similar to the first 3 T states of opcode fetch( as first 3 states of opcode fetch is effectively memory read)
  • IO/M(bar) = 0
  • S1 = 1 S0 = 0
Memory Write(for 1 byte)
====================
  • WR bar is used When data is placed on data bus.

IO Read and IO Write
==================

  • Simlar to the above two, only IO/M(bar) = 1

These are the basic machine cycles you will require to draw timing diagrams for most instructions.



HOW TO DRAW TIMING DIAGRAM
========================

Now, to draw the timing diagram for any instruction you need to understand what exactly the instruction does.

A) MOV A,B
  • Draw only opcode fetch(4 T Cycles)
  • no further memory acces is required as operands specified in registers only
B) MVI A,32H

  • Draw opcode fetch
  • memory read as operand(1 byte) has to be fetched from memory
C) LXI H, 2000H

  • Draw Opcode Fetch
  • two memory Reads as two bytes, 00H and 20H, (lower byte fetched first) have to be read from memory.
D) STA 2000H

  • This instruction stores the value of accumulator(8 bit) at the location specified.
  • Opcode fetch
  • Two Memory read (byte address)
  • One Memory write (1 byte)
  • 13 T-states 4+3+3+3
  • During the memory write the address bus contains the address fetched by the memory read cycle earlier
F)JMP 16-bit address

  • Opcode Fetch
  • Two Memory Read ( 16 bit = 2 bytes)
  • 10 T-states 4+3+3

I HOPE THIS ARTICLE HELPS......!!

Wednesday, August 25, 2010

Update on the Fatherboard-Motherboard

Just purchased a Brand new Motherboard and Processor(Though I did have one, but it was way too Outdated).



Motherboard: Intel DG41RQ



Processor: Core 2 Duo 2.93GHz, 3MB L2 Cache


You might be wondering why the hell I purchased a new Processor...well, I needed an upgrade for better gaming experience. I had an option for purchasing Core i3 but it wasn't that good for gaming.

Regarding assembling the parts altogether, I can assemble the parts but For the Sake of Safety of a brand new Motherboard/Fatherboard :-)), I WONT

Will have to wait till Sunday as the person who will do the repair job is currently outside Kolkata.

So, I wont be able to blog until that period.

S-a-y-o-n-a-a-r-a

Saturday, August 21, 2010

I am Sorry....


For all my followers I feel sorry to inform you that my system had crashed last morning (Saturday) and that is why I am unable to provide you with any updates. After some Alpha, Beta, Gama Testing I have found that there is an error in the Motherboard (not Fatherboard). I have called for an expert and thereafter some repair work is expected to happen. I am all set to loose a hefty sum of Bucks from my Pocket.

In the mean time why dont you all follow some older blogs ....and maybe comment on them. Thank you.

Thursday, August 19, 2010

Class Updates Aug. 19th

Class Updates
===========

Mr. Tanay a.k.a. "Bank of Baroda"...who you know has previously left NASA to join NSEC, IT showed his teaching Skills. Actually to be fair to everybody.....I would say he tried to Teach. When some poor innocent cute little people queried and asked few question to the NASA'ian ehh...NSEC'an...He went Berserk and reacted vigorously..
Look at the Anger....."DONT MAKE ME CRAZY...."

"WHO ELSE WANTED TO ASK A QUESTION...???"


what kind of photo is this...??
Well its the photo of the floor...
And why did I took the photo,
Its because it shows the water that was pouring from the heavens was making its way through the walls also..

Microprocessors and Microcontrollers 19th Aug.

Increasing Counter(0-F)
=======================

XX: MVI B,10H
XRA A
XY: 01H
INR A
DCR B
JNZ XY
JMP XX


Decreasing Counter(F-0)
=======================

XY: MVI A,10H
XX: DCR A
OUT 01H
JNZ XX
OUT 01H
JMP XY



NOTE: INR/DCR Does not affect CARRY FLAG



Increasing Counter(00-FF)
==========================

XRA A
XY: OUT 01H
INR A
JMP XY



Decreasing Counter(FF-00)
==========================


MVI A,FFH
XX: OUT 01H
DCR A
JMP XX




FOUR NEW INSTRUCTIONS
======================

1.RAL (Rotate Accumulator Left with carry)
2.RLC (Rotate Accumulator Left)
3.RAR (Rotate Accumulator Right with Carry)
4.RRC (Rotate Accumulator Right)


Few diagrams will make u clear....

RAL:
RLC:




RAR AND RRC are just the opposite of RAL AND RLC...



Always Remember:
================

Left Shift: A number gets multiplied by 2
Right Shift: A number gets divided by 2



05H X 04 H
===========

MVI A,05H
RLC
RLC

Wednesday, August 18, 2010

Class Updates Aug. 18th


Class Updates
===========

Boyz Topper from IT,Group II with 9.04
Mr. Abhay Bhusan
Expected to Give a treat.....

Mr. Chiranjeev "Golu" got smacked by Mr.Raju (the virtual Anti-Ragging member) due to some personal incompabilities. It was a treat to watch. Both of them exchanged some good words, giving some nice gestures also. For More Info. contact either of them....



Friends...Friends.....and More friends.....
Adda, Masti and Fultooo Enjoyment....

Microprocessors and Microcontrollers 18th Aug.


Chunk Of Data Transfer from one memory region to another
-----------------------------------------------------------------------

XRA A
MVI E,OAH
LXI H,2000H
LXI B,7000H

XX: LDAX H
STAX B
INX B
DCR E
JNZ XX
HLT

Some points
------------

LDAX H
Now from LXI H,2000H
It is clear that H,L pair contain address 2000H
So, Accumulator Stores the value at address 2000H

I/O
===

Two Types
(i) Memory Mapped I/O
(ii) I/O Mapped I/O

Memory Mapped I/O
==================
Scope of I/O is from Memory itself
Address-16bit
Ex- STA,LDA

I/O Mapped I/O
==============

I/O selection scope from external peripherals
Address-8bit
Ex- IN,OUT

IN 01H
Means....Input from 01H Port address to the accumulator

OUT 01H
Means.....Output to 01H Port address from the accumulator



Total Port Addresses: 256

Object Oriented Programming (OOP) Lab Aug 18th

First Program By me and Mr.Ashish

Fibonacci and Factorial
==================


import java.util.Scanner;

import java.io.*;

class fact
{
int i,f=0,s=1,third,fact=1,n;

int face(int n)
{

if(n==0)
{
return(fact);
}
else
for(i=1;i<=n;i++)
{
fact=fact*i;
}
return fact;
}



void fibbo(int n)
{
System.out.println("\n\n\n"+f+"\n\n"+s);

for(i=0;i
{

third=f+s;

f=s;

s=third;

System.out.println("\n\n\n"+third);

}
}

}


class demofact
{
public static void main(String args[])
{
int n,x,choice;


Scanner in=new Scanner(System.in);

while(true)
{
System.out.println("\n\nENTER THE CHOICE...\n\n\n1.FACTORIAL...\n\n\n2.FIBBONACI....\n\n\n3.EXIT");
choice=in.nextInt();
switch(choice)
{
case 1:

System.out.println("\n\n\nENTER THE NUMBER...... ");
n=in.nextInt();
fact ob1=new fact();
System.out.println("\n\n\nThe factorial is "+ob1.face(n));
break;

case 2:
System.out.println("\n\n\nENTER THE NUMBER...... ");
n=in.nextInt();

fact ob2=new fact();
ob2.fibbo(n);
break;

case 3: break;

}
}
}
}


This program however contains a small bug....When U will try to exit the program, it wont. For exiting u can use any alphabet like a,b.... which will generate an exception and then u can exit. We will solve the problem quickly.


Palindrome by Arka "MBPS" Mukherjee a.k.a "Java.lang"
===========================================


import java.io.*;
public class palindrome
{
public static void main(String args[])throws IOException
{


char c[]=new char[20];
char b[]=new char[20];
int a;
int n;
String s;
boolean ispalindrome=true;
System.out.println("enter the STRING");
BufferedReader br=new BufferedReader(new InputStreamReader(System.in));
s=br.readLine();
c=s.toCharArray();
n=s.length();
for(int i=n-1;i>=0;i-- )
{
b[n-i-1]=c[i];
}
for(int i=0;i
{
if(b[i]!=c[i])
{
System.out.println(" Not Palindrome");
ispalindrome=false;
break;
}
}
if(ispalindrome)
System.out.println("It is Palindrome");


}
}


Object Oriented Programming (OOP) Lab Aug 11th


Programs done by Arka "MBPS" Mukherjee....
Thank you Arka a.k.a. "Java.lang"

Whether a number is Prime or not
=========================


class PrimeA
{
public static void main(String args[])
{
boolean isprime=true;
int n;
n=Integer.parseInt(args[0]);
for(int i=2;i
{
if(n%i==0)
{
System.out.println("The no is not a prime"+" "+n);
isprime=false;
break;
}
}
if(n==2||isprime==true)
System.out.println("The no is a prime one and it is :"+" "+n);
}
}



Prime and Non-Prime Numbers within a range
==================================

this program shows you whether a number is prime or not within 50.


import java.io.*;
public class ModifiedPrime
{
public static void main(String args[])
{
boolean isprime=true;
for(int j=2;j<=50;j++)
{
isprime=true;
for(int i=2;i<=j;j++)
{
if(i==j)
{
System.out.println("The no is prime"+" "+i);
isprime=true;
break;
}
else
{
if(j%i==0)
{
System.out.println("The no is not a prime no"+" "+j);
isprime=false;
break;
}
}

if(isprime==true)
System.out.println("The no is prime"+" "+j);
}
}
}
}


Sorting
======



import java.io.*;
class ModifiedSorting
{
public static void main(String args[])throws IOException
{
int i,temp,j;
int a[]=new int[10];
for(i=0;i<10;i++)
{
try
{
a[i]=Integer.parseInt(args[i]);
}
catch(ArrayIndexOutOfBoundsException e)
{
System.out.print("");
}
}
for(i=0;i<10;i++)
{
for(j=i;j<10;j++)
{
if(a[i]>a[j])
{
temp=a[j];
a[j]=a[i];
a[i]=temp;
}
}
}
System.out.println("the required sorted array is");
for(i=0;i<10;i++)
{
if(a[i]!=0)
System.out.println(a[i]);
}
}
}

Here after you compile do not forget to pass the values while executing...
Like.....
java ModifiedString 10 11 4

Arka hats off to you for giving me the codes. Some credit goes to me also as I corrected some designing errors....



Tuesday, August 17, 2010

Class Updates Aug. 13th-17th

First things First
=============

BREAKING NEWS-Lost Brothers Found!!
And that too in our college. You might no believe your eyes but its true....Have a look
Look at the resembence......
It makes me remember the Ad...Ramesh...Suresh
They were really happy when they saw each other after 45 long Years....;-)

Mr. Sarbajit
Showing his keth....Nothing serious..As usual

Actually when the last photo was taken. I asked the boy with Red T-Shirt to step aside for the photo....

No, I really shouldn't have done that...I did rectified my mistake by asking him for a photo...Believe me he was Happy....

Actually I do know this guy, a nice dude from Bokaro.
Mr. Pradeep, ECE 2nd Year
He lives in my mess, to describe him in one word I'll say "Hard Working..."
And I do Mean it....


Mr. Arka "MBPS" Mukherjee in action....
He is a nightmare for the teachers, when he goes to TURBO mode....

Welcome Back Praveen


The dude is back with bang.
Mr. Praveen
Look at his hair guyz...

Object Oriented Programming (OOP) Aug 17th


Returning an object
================

class Test {
int a;
Test(int i) {
a = i;
}
Test incrByTen() {
Test temp = new Test(a+10);
return temp;
}
}



class RetOb {
public static void main(String args[]) {
Test ob1 = new Test(2);
Test ob2;
ob2 = ob1.incrByTen();
System.out.println("ob1.a: " + ob1.a);
System.out.println("ob2.a: " + ob2.a);
ob2 = ob2.incrByTen();
System.out.println("ob2.a after second increase: "
+ ob2.a);
}
}





The output generated by this program is shown here:
ob1.a: 2
ob2.a: 12
ob2.a after second increase: 22




Demonstrate static variables, methods, and blocks.
======================================


class UseStatic {
static int a = 3;
static int b;
static void meth(int x) {
System.out.println("x = " + x);
System.out.println("a = " + a);
System.out.println("b = " + b);
}
static {
System.out.println("Static block initialized.");
b = a * 4;
}
public static void main(String args[]) {
meth(42);
}
}




Here is the output of the program:
Static block initialized.
x = 42
a = 3
b = 12




Demonstrate an inner class.
======================

class Outer {
int outer_x = 100;
void test() {
Inner inner = new Inner();
inner.display();
}
// this is an inner class
class Inner {
void display() {
System.out.println("display: outer_x = " + outer_x);
}
}
}
class InnerClassDemo {
public static void main(String args[]) {
Outer outer = new Outer();
outer.test();
}
}


Output from this application is shown here:
display: outer_x = 100


Final Keyboard
============


final int FILE_OPEN=1
final int FILE_EXIT=5

Results Announced.....Server Crashed



Last Night results were announced and the WBUT ultra tech server crashed and many students were kept waiting till late night and next morning also.

Only One person can help WBUT.......GOD

We give hefty sums of money for University Development fee and look what they give us.....Man!! how can a student wait for 5-6 hours after their results are published. Can't they have a good server.

Sunday, August 15, 2010

Class updates Aug. 13th

Sorry for the delay, actually it should have been posted earlier....anyway lets just have a look...

Best T-Shirt Tag
=============

Mr. Sumit Nandi
Tag: I am more than just a Name
My say: Haan bhai....itna bada sharir hai 60 Kilo ka..waise bhi, "Naam me kya rakha hai..."
while i was busy taking the photo, Mr. Sumit was looking for someone else....

Some moments worth sharing
=======================

Mr. Ashish
Do u know, why he has that cute little smile??
No need to guess, he saw someone.......he he


Mr. Atanu Patra
3rd Year student- "A victim of ragging"
Bloody hell....isn't that Mr. Sayan standing beside him...and who is slapping the poor boy.....is it.....Raju....Ja saala 3rd year er ragging 3rd year nibe....Ki dinkal.

GUYZ WE NEED TO PROTEST AGAINST THIS

Ohhh.....I think I was taking the Photo and was having a lot of Fun....

NO NEED TO PROTEST....HE DESERVED THIS....


Microprocessors and Microcontrollers 13th Aug.

High level Language (using interpretator/compiler)------------->Machine Language
Low Level Language (using Assembler) ------------------------->Machine Language

Interpretor: If any error in line(say line no 40)then the interpretor stops.Ex- Basic
Compiler: If any error is detected (say in line 30), then it will continue to process until the end of the program.(thus it will also give all the errors). Ex- C

JAVA-Compiler+Interpretor


Register Related Instruction
----------------------------------

ADD B

Operation: A <- [A]+[B]
ADD: is operational (or Op) code whose size is 8 bit(or 1 byte)
note: every op-code is of 1 byte size


Data Related Instruction
-----------------------------
ADI 07H

operation: A <- [A] + 07H
ADI:Add Immediate- 1 byte
07H: Data (in hex)- Size 4 + 4 bits = 8bits = 1 byte
Total size: 2 bytes
Address Related Instruction
---------------------------------

JMP 2000H

JMP:1 Byte

2000H: 4 + 4 + 4 + 4 = 16 bits = 2Bytes

Total Size: 2 + 1 = 3 Byes

Code-----------Operation-------------------Bytes ==============================================================
ADD B---------A <- [A] + [B]------------------1

ADI 07H-------A <- [A] + 07H----------------2

ANA B---------A <- [A] and [B]---------------1

ANI 07H-------A <- [A] and 07H-------------2

ORA C---------A <- [A] or [C]----------------1

ORI 07H-------A <- [A] or 07H--------------2

XRA B---------A <- [A] XOR [B]-------------1

XRI 07H-------A <- [A] XOR 07H-----------2

MOV A,C-------A <- [C]---------------------1

MVI A,07H-----A <- 07H-------------------2

STA 0705H---------------------------------3

STA: means the content of the accumulator will be transferred to the 0705H location

LDA 2010H---------------------------------3

LDA: means the content at 2010H will be stored at the accumulator

JMP 2050H----------------------------------3

After executing the instruction the control will be transferred to 2050H location.

INR B---------B <- [B] + 1--------------------1

DCR B---------B <- [B] - 1--------------------1



Q. Write the instructions for : B + C

ANS.

MOV A,B

ADD C


Q. How to reset the accumulator?

Ans. There are three methods, but i will show you only the method you have to use...

XRA A

Its because if we apply XOR to same value, the output is always zero.

Q. 1+2+3+4............10

Ans.

MVI B,0AH---------//10 i.e. OAH is stored in he Register B

XRA A--------------//Reseting the accumulator

XY: ADD B---------// A <- [A] + [B] so, A<-10

DCR B--------------// B <- [B] - 1 so, B<-9

JNZ XY------------//Control will go to line XY until value of B is zero



Featured Post 1

notice

Featured Post 2

IETE

Featured Post 6

results

Featured Post 7

WBUT

Featured Post 3

Featured Post 4

Featured Post 5

Featured Post 8