Answers.Body: <p>LSF and LSR are two ways to encode a chess board coordinate into a single integer number. LSF does that by { a1, b1, c1, ... } while LSR encodes by { a1, a2, a3 ... }.</p>
  
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2018-01-07T22:52:57.343Z
Answers.LastActivityDate: 2018-01-07T22:52:57.343Z
Answers.UserDisplayName: SmallChess
Answers.Body: <p>According to the web site you cited:
      LSF squareIndex = 8*rankIndex + fileIndex (rank &lt;&lt; 3 | file)
      LSR squareIndex = 8*fileIndex + rankIndex (file &lt;&lt; 3 | rank)
  (It also shows two bitmaps showing you both cases.)</p>
  
  <p>These just index each square either continuing along the ranks first or the files first.  Using the rank first, lsr, you align the board more to what you imagine the chessboard to be.  Using lsf, you generate pawn attack faster.</p>
  
  <p>My opinion is to use lsr with the starting square being a8.  This allows for faster FEN and GUI conversions.</p>
  
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2018-01-07T23:25:20.703Z
Answers.LastActivityDate: 2018-01-07T23:25:20.703Z
Answers.UserDisplayName: Fred Knight
Body: <p>I'm Reading this tutorial and there are 2 definitions that confuse me :</p>
  
  <p><a href="https://chessprogramming.wikispaces.com/Square+Mapping+Considerations" rel="nofollow noreferrer">https://chessprogramming.wikispaces.com/Square+Mapping+Considerations</a></p>
  
  <p>What's is the Least significant File and Least Significant Rank ?</p>
  
Tags: <engines>
Title: What's is the Least significant File and Least Significant Rank?
ThreadText: # What's is the Least significant File and Least Significant Rank?
  
  (Asked by: username_0 on 2018-01-07)
  
  I'm Reading this tutorial and there are 2 definitions that confuse me :
  
  <https://chessprogramming.wikispaces.com/Square+Mapping+Considerations>
  
  What's is the Least significant File and Least Significant Rank ?
  
  **Tags:** engines
  
  
  ---
  
  ## 2 answers
  
  ### Answer by username_1 on 2018-01-07. Score: 2
  
  LSF and LSR are two ways to encode a chess board coordinate into a single integer number. LSF does that by { a1, b1, c1, ... } while LSR encodes by { a1, a2, a3 ... }.
  
  
  ---
  
  ### Answer by username_2 on 2018-01-07. Score: 2
  
  According to the web site you cited:
  LSF squareIndex = 8\*rankIndex + fileIndex (rank << 3 | file)
  LSR squareIndex = 8\*fileIndex + rankIndex (file << 3 | rank)
  (It also shows two bitmaps showing you both cases.)
  
  These just index each square either continuing along the ranks first or the files first. Using the rank first, lsr, you align the board more to what you imagine the chessboard to be. Using lsf, you generate pawn attack faster.
  
  My opinion is to use lsr with the starting square being a8. This allows for faster FEN and GUI conversions.
  
  
  ---
  
  