|
-
September 30th, 2005, 02:30 AM
#1
one byte == one character... right?
A stupid question here. I've been in the analyzing mode all day... don't know why.
Anyway...
I've always been taught/told that one character is equal to one byte.
Bits in strings of eight are called bytes, and one byte usually represents a single character of data in the computer. It's a little used term, but you might be interested in knowing that a nibble is half a byte (usually 4 bits).
source
Ok, I understand that.
What I don't get.
Say I create a new text document using notepad. I name the file test.txt and save it with no contents. Since the filename has 8 characters, shouldn't it already have a file size of 8 bytes?
This is not the case... if the document has no contents then it is 0 bytes. I'm assuming because the document contains no data within the file. But, wouldn't it still require 8 bytes *somewhere* to store the filename? Not to mention *where* to find the file... on the hard drive. (pointer to the sector(s) )
Why is the space used for filenames excluded?
Sorry, I know... it's stupid. I've just been over analyzing almost everything I see today.
I first noticed it when I tried to tftp a document named test.txt to my router only to tell me that it was 0 bytes and it couldn't be copied. Then I opened the doc and typed the word "test" and it transfered over 4 bytes. Not 12 bytes. (the 4 within the doc and the 8 I used for the filename)
Quitmzilla is a firefox extension that gives you stats on how long you have quit smoking, how much money you\'ve saved, how much you haven\'t smoked and recent milestones. Very helpful for people who quit smoking and used to smoke at their computers... Helps out with the urges.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
|