topbanner_forum
  *

avatar image

Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length
  • Thursday March 28, 2024, 6:26 am
  • Proudly celebrating 15+ years online.
  • Donate now to become a lifetime supporting member of the site and get a non-expiring license key for all of our programs.
  • donate

Author Topic: some basic questions about IT science  (Read 8560 times)

kalos

  • Member
  • Joined in 2006
  • **
  • default avatar
  • Posts: 1,823
    • View Profile
    • Donate to Member
some basic questions about IT science
« on: June 29, 2009, 01:02 AM »
hello I have some questions about basic IT science

1) I know that the K before a metric unit means x1,000 (eg kcal means kilo calories, which is 1,000 calories), but why 1KB is 1,024 bytes and not 1,000 bytes?

2) since 1KB is 1,024 bytes, 1Kb in how many bits is equivalent to? 1,024 bits or 1,000 bits or something else?

3) a character (letter or digit) stored, is 1 bit or 1 byte?

4) I read "Some sources define a kilobit to mean 1,024 (that is, 210) bits", what the part "(that is, 210)" mean actually? I mean, how they come up with 210???

5) since data is stored in clusters (of magnetic media), why there are bad sectors? I mean, how does a whole sector go bad and not just a cluster?

6) why the common area of a track and TWO sectors is called cluster, but there is no definition for the common area of a track and ONE sector, which is smaller area and thus it is more accurate be used as a unit or area?

7) when do we choose to use bit and when byte (as metric units)? in which occasions?

8) what type of information can registers of CPU hold? what kind of functions can ALU of CPU perform?

thanks!
« Last Edit: June 29, 2009, 06:11 AM by kalos »

rsatrioadi

  • Participant
  • Joined in 2009
  • *
  • Posts: 58
    • View Profile
    • Donate to Member
Re: some basic questions about IT science
« Reply #1 on: June 29, 2009, 01:14 AM »
1) because with electronics it's always powers of two. 1KB = 2^10B = 1024B.
2) 1024b.
3) byte. a bit can only contain 0 or 1.
4) I'm sure it's meant to be 2^10.

f0dder

  • Charter Honorary Member
  • Joined in 2005
  • ***
  • Posts: 9,153
  • [Well, THAT escalated quickly!]
    • View Profile
    • f0dder's place
    • Read more about this member.
    • Donate to Member
Re: some basic questions about IT science
« Reply #2 on: June 29, 2009, 09:50 AM »
2) the 1024-bit "computer kilo" is only really unambiguous when combined with bytes. When applied to bits, some people mean SI-kilo and other 1024-kilo, which is a bit messy. At least it doesn't look as ugly as the KiBiBytes etc. that the lunix zealots want to impose on the world.

3) depends. An ASCII character is defined as one byte, where a byte is usually (but not always!) 8 bits. For a lot of languages, this is not enough, though, and then you have to use a MBCS encoding (which can be unicode or "something else"). Unicode covers several different encodings, btw, and isn't just "two bytes per char".

5) sectors are imposed by the storage device, clusters by the filesystem. Since the storage device addresses in sectors, that's why sectors go bad, and not clusters. A filesystem based on clusters will probably choose to mark the whole cluster bad, though. Not all FSes are cluster-based.

6) again, cluster size is defined by filesystems, not anything else.

7) when dealing with computers - and they aren't metric units (you probably mean Système Internationale, btw?)

8) depends on the CPU, really. x86 CPUs have a number of general-purpose registers (amount and size depending on whether you have a 32- or 64-bit x86 CPU, and the operating mode it's in), a number of floating point registers (or rather, a stack), and a number of multimedia/SIMD registers (also depending on how new the CPU is). Operations available also depends on the type of registers (GP, float, SIMD).
- carpe noctem

fenixproductions

  • Honorary Member
  • Joined in 2006
  • **
  • Posts: 1,186
    • View Profile
    • Donate to Member
Re: some basic questions about IT science
« Reply #3 on: June 29, 2009, 10:54 AM »
2kalos
Little overkill for #1-4:
http://en.wikipedia....g/wiki/Binary_prefix

kalos

  • Member
  • Joined in 2006
  • **
  • default avatar
  • Posts: 1,823
    • View Profile
    • Donate to Member
Re: some basic questions about IT science
« Reply #4 on: June 30, 2009, 05:46 AM »
thanks for your replies

why letter a is 01000001? why a letter or generaly character is represented by 8 bits?
since I suppose the total number of possible characters is less than 99,999,999, so why not representing letters/characters as 4 bits, or 6 bits, etc

40hz

  • Supporting Member
  • Joined in 2007
  • **
  • Posts: 11,857
    • View Profile
    • Donate to Member
Re: some basic questions about IT science
« Reply #5 on: June 30, 2009, 06:40 AM »
thanks for your replies

why letter a is 01000001? why a letter or generaly character is represented by 8 bits?
since I suppose the total number of possible characters is less than 99,999,999, so why not representing letters/characters as 4 bits, or 6 bits, etc

It's just an arbitrary design decision that got made based on the available resources of the architecture in question. I suspect that a=01000001 seemed logical to the person designing the system.

The more bits you have in a byte, the more items of information that can be represented by each. If you use 8-bits, there are 256 possible things each byte can represent. Using 4-bits drops it down to 16 possible things. These things can be letters, numbers, machine states, stack counters, machine instructions, information stored in memory, location in the memory address space, etc.

So the greater the number of bits you use for the basic architecture of your system, the more "bitspace" you have to represent whatever you want. And because most CPUs are designed to work by moving bits around on the byte level (hence 8-bit, 16-bit, 32-bit, 64-bit architectures) the general rule of thumb is: the more bits in a byte, the more powerful the architecture. If you think of a byte as a word and a bit as a letter, then a machine with more bits (or letters) has the potential for having a much bigger vocabulary. And since it has a bigger vocabulary, it also (theoretically) has the potential to be used for much more complex and elegant tasks.

At least on paper. (Note: There's a lot more involved in CPU design than just how big its bitspace is. Instruction sets, cache design, multithreading, and a pile of other things are also crucial to the overall performance and power of the system.)

You might want to read Soul of a New Machine by Tracy Kidder. This book tells the real life story of how an actual computer, code-named "Eagle", got designed and built. Although the technology described in the book is somewhat dated (the story took place in the 70s) the methodology, challenges, frustrations and politics of designing a computer have not. Well worth the time to read. It's a classic.

I make it a point to reread this book every couple of years. Each time I do, I never cease to be amazed at just how much - and just how little - has actually changed between readings!

 :Thmbsup:

« Last Edit: June 30, 2009, 07:18 AM by 40hz »

justice

  • Supporting Member
  • Joined in 2006
  • **
  • Posts: 1,898
    • View Profile
    • Donate to Member
Re: some basic questions about IT science
« Reply #6 on: June 30, 2009, 07:11 AM »
homework?

40hz

  • Supporting Member
  • Joined in 2007
  • **
  • Posts: 11,857
    • View Profile
    • Donate to Member
Re: some basic questions about IT science
« Reply #7 on: June 30, 2009, 09:51 AM »
homework?

And here I was thinking I'm the only one who was thinking that! ;D


f0dder

  • Charter Honorary Member
  • Joined in 2005
  • ***
  • Posts: 9,153
  • [Well, THAT escalated quickly!]
    • View Profile
    • f0dder's place
    • Read more about this member.
    • Donate to Member
Re: some basic questions about IT science
« Reply #8 on: June 30, 2009, 10:17 AM »
homework?
And here I was thinking I'm the only one who was thinking that! ;D
Nah ;)

Btw, a machine's bitsize isn't determined from how many bits goes in it's bytes (which is 8 on most architectures). We have the machine's natural word size (or register width), along with it's address space width.
- carpe noctem

40hz

  • Supporting Member
  • Joined in 2007
  • **
  • Posts: 11,857
    • View Profile
    • Donate to Member
Re: some basic questions about IT science
« Reply #9 on: June 30, 2009, 10:24 AM »

Btw, a machine's bitsize isn't determined from how many bits goes in it's bytes (which is 8 on most architectures). We have the machine's natural word size (or register width), along with it's address space width.


I stand corrected.
How soon we forget some of the things we learned in school as we grow older. Sad how that goes. ;D

Thx f0dder! :)

« Last Edit: June 30, 2009, 10:34 AM by 40hz »