code: static void maybeEmbedVersionInfo(Version version, ByteMatrix matrix) throws WriterException {
      if (version.getVersionNumber() < 7) {  // Version info is necessary if version >= 7.
        return;  // Don't need version info.
      }
      BitArray versionInfoBits = new BitArray();
      makeVersionInfoBits(version, versionInfoBits);
  
      int bitIndex = 6 * 3 - 1;  // It will decrease from 17 to 0.
      for (int i = 0; i < 6; ++i) {
        for (int j = 0; j < 3; ++j) {
          // Place bits in LSB (least significant bit) to MSB order.
          boolean bit = versionInfoBits.get(bitIndex);
          bitIndex--;
          // Left bottom corner.
          matrix.set(i, matrix.getHeight() - 11 + j, bit);
          // Right bottom corner.
          matrix.set(matrix.getHeight() - 11 + j, i, bit);
        }
      }
    }
docs: See 8.10 of JISX0510:2004 (p.47) for how to embed version information.