RE: [Dev-C++] Bits Bytes megabytes help needed
Open Source C & C++ IDE for Windows
Brought to you by:
claplace
|
From: Ioannis V. <iv...@em...> - 2003-09-03 05:16:56
|
> -----Original Message----- > From: dev...@li... > [mailto:dev...@li...] On Behalf > Of Eric Churches > Sent: Tuesday, September 02, 2003 10:03 PM > To: dev...@li... > Subject: [Dev-C++] Bits Bytes megabytes help needed > > > Bit bytes megabytes > > Can you tell me how to convert theses by hand? > > How many kilobytes in a megabyte? > > 1024 how would get this answer 1 KB=1024 bytes 1 MB=1024 KB 1 GB=1024 MB HDD manufacturers usually cheat by using 1000 MB for a GB (and so on) but all Oses tell the truth so far. :-) > > 20 to the power of 2? If this is right how do you work it out > or is there another way. Computers store data in binary form so everything is in power of 2. > > I know there is 8 bits to a byte That's not required. In most systems it is though. To be portable check CHAR_BIT in <limits.h> in C and numeric_limits<char>::digits in <limits> in C++. Ioannis Vranos * Programming pages: http://www.noicys.freeurl.com * Alternative URL 1: http://run.to/noicys * Alternative URL 2: http://www.noicys.cjb.net |