Binary conversion 101
In normal numbers a value like 456 is made up of 4*100+5*10+6*1. This is a base 10 number . 10112 is a base 2 number which is equal to 8*1+4*0+2*1+1*1=11 in base 10.
Most programmer'sdon't need or use binary, but in C it can be a useful skill to have.
How Big is a Program?
Computers program can be as small as a few hundred bytes or as large as a few billions bytes. When a
Program is loaded into RAM from Disk the pattern of the bits is copied exactly, even one bit wrong can cause the program to fail.
Computer hardware has been engineered so this doesn't happen.
If an Application (say VLC player) 40 megabytes in size, then roughly 320 million bits are coppied into RAM.
Bit is nothing , it is either 0 or 1 and 8 bits constitute 1 BYTE.
1024 BYTE =1Kb(Kilobytes) roughly 1000=10^3.
1024 Kb=1Mb roughly 1000=10^3 Kb=1Mb=10^3*10^3bytes=1Mb=10^6
Same as 1024 Mb=1Gb=10^9 bytes
also 10^12 bytes = 1Tb(Tera byte)
=1000000000000 individuals ON/OFF switches !

11:59 AM
Alice


0 comments:
Post a Comment