0 comments Tuesday, April 8, 2008

In the picture: Programmers Betty Jean Jennings (left) and Fran Bilas (right) operate the ENIAC's main control panel at the Moore School of Electrical Engineering.

ENIAC
, short for Electronic Numerical Integrator And Computer, was the first general-purpose electronic computer. Precisely, it was the first high-speed, purely electronic, Turing-complete, digital computer capable of being reprogrammed to solve a full range of computing problems, since earlier machines had been built with some of these properties. ENIAC was designed and built to calculate artillery firing tables for the U.S. Army's Ballistic Research Laboratory.
The contract was signed on June 5, 1943 and Project PX was constructed by the University of Pennsylvania's Moore School of Electrical Engineering from July, 1943. It was unveiled on February 14, 1946 at Penn, having cost almost $500,000. ENIAC was shut down on November 9, 1946 for a refurbishment and a memory upgrade, and was transferred to Aberdeen Proving Ground, Maryland in 1947. There, on July 29 of that year, it was turned on and would be in continuous operation until 11:45 p.m. on October 2, 1955. ENIAC was conceived and designed by John Mauchly and J. Presper Eckert of the University of Pennsylvania. The team of design engineers assisting the development included Bob Shaw (function tables), Chuan Chu (divider/square-rooter), Kite Sharpless (master programmer), Arthur Burks (multiplier), Harry Huskey (reader/printer), and Jack Davis (accumulators).
ENIAC contained 17,468 vacuum tubes, 7,200 crystal diodes, 1,500 relays, 70,000 resistors, 10,000 capacitors and around 5 million hand-soldered joints. It weighed 30 short tons (27 t), was roughly 8.5 feet by 3 feet by 80 feet (2.6 m by 0.9 m by 26 m), took up 680 square feet (63 m²), and consumed 150 kW of power. Input was possible from an IBM card reader, while an IBM card punch was used for output. These cards could be used to produce printed output offline using an IBM accounting machine, probably the IBM 405.

ENIAC used ten-position ring counters to store digits; each digit used 36 tubes, 10 of which were the dual triodes making up the flip-flops of the ring counter. Arithmetic was performed by "counting" pulses with the ring counters and generating carry pulses if the counter "wrapped around", the idea being to emulate in electronics the operation of the digit wheels of a mechanical adding machine. ENIAC had twenty ten-digit signed accumulators that used ten's complement representation and could perform 5,000 simple addition or subtraction operations between any of them and a source (e.g., another accumulator, constant transmitter) every second (Note: It was possible to connect several accumulators to run simultaneously, so the peak speed of operation was potentially much higher due to parallel operation). It was possible to wire the carry of one accumulator into another to perform double precision arithmetic but the accumulator carry circuit timing prevented the wiring of three or more for higher precision. The ENIAC used four of the accumulators controlled by a special Multiplier unit and could perform 385 multiplication operations per second. The ENIAC used five of the accumulators controlled by a special Divider/Square-Rooter unit and could perform forty division operations per second or three square root operations per second. The other nine units in ENIAC were the Initiating Unit (started and stopped the machine), the Cycling Unit (synchronized the other units), the Master Programmer (controlled "loop" sequencing), the Reader (controlled an IBM punch card reader), the Printer (controlled an IBM punch card punch), the Constant Transmitter, and three Function Tables.

Source:wikipedia.org

0 comments Sunday, April 6, 2008

The Answer is EFI.

Extensible Firmware Interface
(EFI) is a specification that defines a software interface an operating system and platform firmware. EFI is intended as a significantly improved replacement of the old legacy BIOS firmware interface historically used by all IBM PC compatiblepersonal computers. The EFI specification was originally developed by Intel, and is now managed by the Unified EFI Forum and is officially known as Unified EFI (UEFI).
The original motivation for EFI came during early development of the first Intel-HP Itanium systems in the mid-1990s. PC BIOS limitations (16-bit processor mode, 1 MB addressable space, PC AT hardware dependencies, etc.) were seen as clearly unacceptable for the larger server platforms Itanium was targeting. The initial effort to address these concerns was initially called Intel Boot Initiative and was later renamed to EFI.

Linux systems have been able to use EFI at boot time since early 2000, using the elilo EFI boot loader. elilo is the only means to boot Linux on IA-64 platforms. As of July 2007, elilo support for platforms; it can also be used on IA-32x86-64 mode is available through a beta release.
Apple has adopted EFI for its line of Intel-based Macs. Mac OS X v10.4 “Tiger” for Intel and Mac OS X v10.5 “Leopard” thoroughly support EFI.

So, for booting into Mac OSX we need to have EFI or EFI emulator.

0 comments


In the Picture: My Favorite Linux Distro(Distribution)

Linux (pronounce as "linnux") a Unix-like computer operating system. Linux is one of the most prominent examples of free software and open source development: typically all underlying source code can be freely modified, used, and redistributed by anyone.

The name "Linux" comes from the Linux kernel, started in 1991 by Linus Torvalds. The system's utilities and libraries usually come from the GNU operating system, announced in 1983 by Richard Stallman. The GNU contribution is the basis for the alternative name GNU/Linux.

The TUXThe concept of the Linux mascot being a penguin came from Linus Torvalds, the creator of Linux. Tux was created by Larry Ewing in 1996 after an initial suggestion made by Alan Cox and further refined by Linus Torvalds on the Linux kernel mailing list. Linus took his inspiration from a photograph he found on an FTP site, showing a penguin figurine looking strangely like the Creature Comforts characters made by Nick Park. The first person to call the penguin "Tux" was James Hughes, who said that it stood for "(T)orvalds (U)ni(X)". However, many people observe that Tux is also an abbreviation of tuxedo, the outfit which springs to mind when they see a penguin. Tux was originally designed as a submission for a Linux logo contest. Three such competitions took place; Tux won none of them. This is why Tux is formally known as the Linux mascot and not the logo.

According to Jeff Ayers, Linus Torvalds had a "fixation for flightless, fat waterfowl" and Torvalds claims to have contracted "penguinitis" after being gently nibbled by a penguin: "Penguinitis makes you stay awake at nights just thinking about penguins and feeling great love towards them." Torvalds' supposed illness is of course a joke, but he really was bitten by a Little Penguin on a visit to the National Zoo & Aquarium, Canberra, Australia. Torvalds was looking for something fun and sympathetic to associate with Linux, and a slightly fat penguin sitting down after having had a great meal perfectly fit the bill.

In an interview Linus commented on the penguin bite.

Linus: I've been to Australia several times, these days mostly for Linux.Conf.Au. But my first trip - and the one when I was bitten by a ferocious fairy penguin: you really should keep those things locked up! - was in 93 or so, talking about Linux for the Australian Unix Users Group.


0 comments Friday, April 4, 2008

The following question was asked in a contest, held at our campus, which took me sometime to answer. Though in the end its quite clear that it was not so hard to crack at all.

A Good Question To Answer:

Everyone knows about base-2 (binary) integers and base-10 (decimal) integers, but what about base i-1? A complex integer n has the form n=a+bi, where and and b are integers, and i is the square root of -1 (which means that i2=-1). A complex integer n written in base (i-1) is a sequence of digits (bi), writen right-to-left, each of which is either 0 or 1 (no negative or imaginary digits!), and the following equality must hold.

n = b0 + b1(i-1) + b2(i-1)2 + b3(i-1)3 + ...

The cool thing is that every complex integer has a unique base-(i-1) representation, with no minus sign required. Your task is to find this representation.

Input
The first line of input gives the number of cases, N (at most 20000). N test cases follow. Each one is a line containing a complex integer a+bi as a pair of integers, a and b. Both a and b will be in the range from
-1,000,000 to 1,000,000.

Output
For each test case, output one line containing "Case #x:" followed by the same complex integer, written in base i-1 with no leading zeros.

Sample Input Sample Output
4
1 0
2 3
11 0
0 0
Case #1: 1
Case #2: 1011
Case #3: 111001100
Case #4: 0


Problemsetter: Igor Naverniouk(Lets give him some credit)

My Solution::The C Version>>>

/*
* Base i-1
* A good one:::: By Igor Naverniouk
* prob 11180 on ACM site [volume CXI]
* Cracked and Explained by Rohit Yadav on 23 March 2008.
* Email: rohityadav89@gmail.com
*
* ALGORITHM
* Lets divide the complex, Z=a+bi by i-1 and we get>>>
* a+bi = (p+iq) (i-1) + (r+si) >>>(r+si) being remainder
* (a+bi)/i-1= ((b-a)+i(-a-b))/2
* if (b-a)/2 = even then... p=(b-a)/2 and q= (-a-b)/2 and remainder = 0
* if (b-a)/2 = odd then if p=(b-a+1)/2 and q= (-a-b+1)/2 to make it even then...remainder = 1 (r=1 s=0)
* keep it looping until both a and b are zero
* There we go...
*
* Common Sense sensed:::
* sum or difference of any odd and even is odd
* sum or difference of any odd and odd, even and even is even
*
* numbers being opposite means one being odd and other even...
* odd number will have last bit 1 & even will have last bit 0 when converted to binary system
*
*/

#include "stdio.h"

int main()
{
char ans[200];
int N, prob, a, b, na, nb;
printf("Enter no. of test cases\n");
scanf( "%d", &N );
for( prob = 1; prob <= N; prob++ ) { scanf( "%d %d", &a, &b ); char *nans = ans + 100; *nans = '\0'; //XOR ^ checks if a or b are . and masks with 1 using bitwise & to check if they are . do { if( ( a ^ b ) & 1 ) { *--nans = '1'; // b-a >>> ODD means remainder is 1
a--; //a-- so that b-a= b-(a-1)=b-a+1 ...
}
else
{
*--nans = '0';
}

//if a and b are both even or odd then b-a is even
na = b - a;
nb = -a - b;
//if they are opp...na=b-a+1;and nb=-a+1-b is done as a-- done above...

//here na and nb are always turning out to be even hence rightshift by one
//Rightshift by one divides an even number by 2
a = na >> 1; b = nb >> 1;
counter++;
}
while( a || b );

printf( "Case #%d: %s\n", prob, nans );
}
return 0;

}

//I am unable to provide proper indentation here....

The above code was sent to me and I took some time to give you the Algorithm a more easy to understand commented version. So, lets give me some credit too :-)


0 comments Tuesday, April 1, 2008

I have just created an Image Processing(IP) tool called "iStudio". It has following utilities:
Grayscale conversion, Sepia Tone conversion, Image Binarization, Background, Changer[WallpaperX], 2 Source Filters: Merge and Difference, Image Inversion, Tinge Image:RGB, Resize, Rotate, Flip Image, BMP/JPEG Format support, Good GUI.

Coding Specification:
- Built in C# on .NET framework 3.5
- Uses user defined functions rather than Image Processing library tools of C#.
- Uses 2 Source Difference algorithm designed by me.
- User friendly GUI and easy to use.
- Background Changer: WallpaperX

Screen shots for WallpaperX::
The first image is showing my friend Saket Saurabh standing in front of a table and the second image shows the background. Applying 2 source difference first and then changing the background produces the final image shown below.

This project uses simple IP algorithms. The project lacks error handling but is good for starters. Its a good learning project to IP, if you are new to IP(Image Processing).
The source code is free to use, modify and redistribute. You all can download it for free!
Download Source code at: http://www.esnips.com/nsdoc/b3b09a97-5eca-4d68-baed-9830b282ccb5
Download iStudio.exe:(This executable requires preinstalled .NET framework 3.5, it has minor bugs/issues )
http://www.esnips.com/nsdoc/3ef9ccb4-6235-4cba-92b2-aa68b7328d92

35 comments

This is my revised iATKOS installation blog for all the MAC lovers across the globe:

The Creators of the Mac OS have made the OS in such a way that it can be installed on their computer only. But developers and hackers around the world have created iAtkos, the patch for installing Mac OS on PC. For more information click here to see my blog on Why Mac OS cannot be installed on PC.

CAUTION: INSTALLING iATKOS CAN SERIOUSLY DAMAGE YOUR COMPUTER AND YOUR HARD DISK. THIS IS JUST FOR KNOWLEDGE. TRY IT ON YOUR OWN RISK. LASTLY, SAY NO TO PIRACY.

MY EXPERIENCE:

First, I got iATKOS V1.0ir2 and burned it on DVD-R. Then I booted the DVD up after selecting the primary booting device as my CD/DVD-RW drive.
If everything is fine, it will boot up with a grey apple in the center of a white screen.
If it does not boot, then enter:
-v cpus=1
then this will boot showing all the processes it is doing, its good for those PC with low graphics card memory. This takes about 4-5 minutes.
The following screen will be observed when the DVD boots up successfully:

Secondly, goto the Disk Utility and create/select partitions you want to use using MBR PARTITION as the partition table format which can be found in options on the left side of the erase option. Also give it some label i.e. a volume name like MACOSX.

Then , select the drive you want to use as MAC OS partition and select security option and select zero out data option to write zeroes on the disk and ERASE FREE SPACE first(THIS IS IMPORTANT IF YOU DON'T WANT TO USE GPARTED PARTITIONO TOOL OR ANY OTHER WAY FOR PARTITIONING).
Next, you erase the partition using Mac Journaled (HFS+) option.

Now go to the Terminal and type in:

diskutil list

This will print all the drives available on your computer, look for your partition's label see something like disk0s1, disk0s2 etc.... according to the partition you intend to install the OS.
Note down its details.

Now go back to the installation screen. Click Agree and choose the intended partition as destination.

THIS IS IMPORTANT: Select Customize(see left-bottom side) and select only the iATKOS base system and the Darwinx86 Bootloader and no other bootloader or EFI emulator. DON'T SELECT ANYTHING ELSE.
SKIP THE DVD checker.

The installation will take about 20-30 minutes. Now reboot your computer.

Enter the boot menu by pressing F8 and enter the following:
-v cpus=1
(This is to insure no booting failure, otherwise let the DVD boot as it did before.)

This will boot into the installation menu. Now open Terminal and enter the following:
fdisk -e /dev/rdisk(hard drive number) e.g = fdisk -e /dev/rdisk0 its generally 0
Press ENTER

flag (partition number) e.g = flag 2
Press ENTER
update and press ENTER
write and press ENTER
Now whatever it says just enter Y or y.
Now enter q or Q to exit.
Quit the Terminal.

Now go back to your installation screen and select the PARTITION you have used to install the iATKOS base, then click CUSTOMIZE. Select something like below ONLY:
In the Patches option select:
-Remove Thermalkexts
-Remove CPUPowerManagement Driver
Now click install while skipping the DVD checker. This part will be quick and will take less than 5 minutes. It will show some error like "No (OS)system was installed" but that's all right.

Now REBOOT and take out DVD and Enter BIOS quickly!
Select HARD DISK AS THE PRIMARY BOOTING DEVICE.

Now save and exit from the BIOS. If all the things go fine, you will see the welcome video! Now rest things like creating account etc. is simple.

NOTE: I used Pentium4, 256 MB, Dual Core 1.8 Ghz Desktop. It took me 5 days to find solution to this topic. Booting may become a concern, following discussion taken from the comments may help you:

I have bad news for some people. If your computer says something like some .plist file not found or the booting screen(Apple in between of the white screen) hangs that would mean that you are either not having a good Graphics Card(It requires one with at least 64MB RAM for a smooth installation)or the DVD may be corrupt and there are more reasons to be figured out.

Here are some solutions:

First of all, insert the iATKOS dvd, and reboot your computer. There is many ways on how to do this part.

Attempt 1 - On the countdown screen, just click enter.

Attempt 2 - On the countdown screen,press 'F8', and type in '-v', and click enter.

Attempt 3 - On the countdown screen,press 'F8', and click the escape button.

Attempt 4 - On the countdown screen,press 'F8', and type in '-x', and click enter.

Attempt 5 - On the countdown screen,press 'F8', and type in '-f', and click enter.

NOW EVEN IF BOOTING FAILS THEN
Try this:

On the countdown screen, press 'F8', and type in 'cpus=1', and click enter.
Look carefully, enter cpus=1 only!

NOW A MUST READ:


You don't know One thing why I posted this blog...
I am no genius, I too had to install and try again and again and as I want to do this SO badly I kept on trying new ways for about 5 days, until on the night 30th March I successfully installed it on a desktop. So, I thought to share my piece of experience with the world. My aim was to show ray of hope to confused people and As I have received close to 1000 visits so far, I feel my objectives fulfilled.

But one thing I want to tell you: you have to try it again and again.
First of all I would recommend you to burn the iso on a good quality DVD at lowest burning speed and check that it is the R2 version of iATKOS. Secondly, try to do the things that I did. On 64bit computers the installer fails to recognize hard drive and in some cases due to old legacy BIOS, the DVD fails to boot.

Using MAC OS on PC was a new experience. But, after comparing the speed and the booting time I would like you to give a thought of buying Apple computers like MACBOOK or iMACS the next time you want to buy a computer if YOU BADLY NEED MAC OS.
MAC OS on PC took a lot of time while booting. And it hanged while using multiple applications at the same time. Comparing that, I cruise smoothly through my MacBook no matter what I am doing on it.

Also see comments for discussions with past visitors.