Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7905127
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 3, 20262026-06-03T10:20:53+00:00 2026-06-03T10:20:53+00:00

I have been looking at the LBA to CHS equations located here and I

  • 0

I have been looking at the LBA to CHS equations located here and I am having trouble understanding why they work. Could someone explain why these equations work? (Perhaps giving a brief explanation of the order in which data is stored on a storage device such as a floppy disk)

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-03T10:20:54+00:00Added an answer on June 3, 2026 at 10:20 am

    CHS refers to cylinders, heads and sectors from the days when disks literally did access data that way – choosing a cylinder, head and sector to read.

    LBA is a newish scheme which basically addresses the disk as a continually increasing number of blocks.

    The conversion scheme essentially gets you from one to the other. Firstly, the equation gives you placeholders for some values you need to know – how many heads per cylinder, and how many sectors per head.

    So, now imagine you have some data like this:

    Cylinder number    Head Number     Sector Number   Data           LBA
    ================================================================================
           0               0                0          A              1
           0               0                1          B              2
           0               0                2          A              3
           0               1                0          B              4
           0               1                1          A              5
           0               1                2          B              6
    

    This is a deliberately contrived scheme in which there are only three tracks per head. How, we’ve chosen to order the LBAs such that each track number we go up by increases the number. However, when we switch heads, we also need to increment the track number. Thus, we could say:

    LBA = sectors per head * current head + current sector number
    

    So now to find LBA 4, we know in CHS notation that equals (0,1,0). Wth three sectors per head, 3*1+0=4.

    Note, I’ve deliberately missed off the -1 so you focus on the idea – that’s used because LBAs are zero-offset.

    Anyway, so this works fine for heads and sectors, but what about cylinders? Well, if the cylinder number goes up by one we have jumped number of heads per cylinder heads forward on the disk, which is number of heads per cylinder times number of sectors per head sectors on the disk. If we’re given a cylinder, head, sector tuple we can work out how many sectors that might add up to:

    LBA = (((cylinder number * heads per cylinder) + head number) *
          * sector per head) + sector number - 1
    

    Working from left to right, the first part of the equation converts the cylinder number to the number of heads required to jump; the next part adds the current head number to that and converts it into a number of sector. Finally, you add the current sector number and subtract one from zero indexing.

    I’m sort of repeating myself here and for good reason – this is just one of those concepts. If it helps, draw a parallel – convert from hex to decimal. Assume I’ve given you FED and want to know what that is in decimal. Well, the conversion would be:

    dec = (((15*16)+14)*16)+13
    

    How did I work that out? Well, from left to right in FED, there are 16 “hundreds” per “ten” and we have the digit 15. To that we add the number of “tens”, which is 14. This we multiply by 16 again because there are 16 “tens” per unit. Finally, we add on the extra 13 units.

    The thing is, you do this kind of thing every day with decimal numbers – the only difficulty here is that the base, or radix is a number that isn’t ten and therefore makes sense in our natural notation.


    Edit: it’s just occurred to me you are in fact asking about the opposite direction. That’s much easier!

    Firstly, the modulus operator – this means the remainder of a given value when divided by another value. So if we have r = X mod Y then r is the remainder when X is divided by Y.

    This is commonly referred to as clock arithmetic, on account of the fact that like a clock, these values go around in a circular fashion as you increase X.

    We can also calculate the quotient of a divisor – given a pair X,Y and computing X/Y, that’s the largest value of A such that X > AY.

    Put it all together and if you’re asked to compute the quotient and remainder of 32 divided by 5, we see that 2 = 32 mod 5, since 5 divides 30. Then, 30=6*5, so the quotient is 6.

    Right, now onto the formula. Given an LBA address, we know that if we multiply tracks per head by heads per cylinder, that gives us the number of tracks a given cylinder number “covers” – all the remainders in this range use the same cylinder nunber. Practical example using the contrived table above: there are three tracks per head and let’s say 6 heads per cylinder – so 6*3=18. Now take an LBA, say 5 – 5/18 = 0 remainder 5. So we take that quotient value to be the cylinder number, which it is.

    So the next question takes the LBA number and divides that by the sectors per track you have – why? Well remember, our LBA counts “tracks”. Dividing by this value and taking the floor (since each individual track accounts for all the possible remainders) converts us to heads. We then take that value modulo the number of heads per cylinder so that, for example, if we have 6 heads per cylinder and a head value of 8, we correctly report the head number as 2 (the cylinder number being 1, accounting for the first 6).

    Finally, the sector number is a simple LBA divided by sectors per track (plus one to offset the zero indexing) remainder. Why? Well, each track can only contain a certain number of sectors before a different head/track is needed.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have been looking everywhere but could not find a tutorial for this. I
I have been looking into different types of timers that i could use for
I have been looking over the internet, but could not find the perfect tutorial
I have been looking at how I could use Single linked lists using the
i have been looking around to try and work out how to pass 2
Have been looking on some tutorials for drawing canvas using SurfaceView, but the only
I have been looking around for a visualization framework that would aid graph visualization
I have been looking online to find documentation for the function in QTP and
I have been looking into AWS spot instances for some jobs however instead of
I have been looking into backbone.js and I can't seem to figure out how

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.