# US 2025/0167809 A1 · Hamming code encoding and arranging method and storage device detection method

> Agents: this data is available as JSON from the patentgrep API and MCP server — see https://patentgrep.com/llms.txt

- Number: US 2025/0167809 A1
- Document ID: US20250167809A1
- Status: Published application
- Kind: A1
- Application number: 18/807,215
- Filed: 2024-08-16
- Published: 2025-05-22
- Earliest claimed: 2023-11-20
- Assignees: Focaltech Systems Co., Ltd.
- Applicants: FocalTech Systems Co., Ltd.
- Inventors: Yen-Kai TSAI; Shao-Cheng WEN
- Web page: https://patentgrep.com/patent/US20250167809A1

## CPC

- H03M 13/1174: {Parity-check or generator matrices built from sub-matrices representing known block codes such as, e.g. Hamming codes, e.g. generalized LDPC codes}
- H03M 13/19: Single error correction without using particular properties of the cyclic codes, e.g. Hamming codes, extended or generalised Hamming codes
- H03M 13/2703: {the interleaver involving at least two directions}
- H03M 13/2778: {Interleaver using block-wise interleaving, e.g. the interleaving matrix is sub-divided into sub-matrices and the permutation is performed in blocks of sub-matrices}
- H03M: CODING; DECODING; CODE CONVERSION IN GENERAL (using fluidic means F15C4/00; optical analogue/digital converters G02F7/00; coding, decoding or code conversion, specially adapted for particular applications, see the relevant subclasses, e.g. G01D, G01R, G06F, G06T, G09G, G10L, G11B, G11C, H04B, H04L, H04M, H04N; ciphering or deciphering for cryptography or other purposes involving the need for secrecy G09C)

## Abstract

A Hamming code encoding and arranging method includes: dividing an original data into N groups of to-be-encoded data and performing Hamming code encoding on the N groups of to-be-encoded data to generate N groups of encoded data; for the N groups of encoded data, extracting p-bit encoded data in each group of encoded data for successive arrangement; when the number of bits remaining in each of the N groups of encoded data is greater than or equal to p, extracting p-bit encoded data in each group of encoded data for successive arrangement; and when there is no data remaining in each of the N groups of encoded data, generating rearranged encoded data according to the arrangement; or when there are q(<p) bits remaining in each group of encoded data, extracting q-bit encoded data in each group of encoded data for successive arrangement to generate rearranged encoded data.

## Claims

### Claim 1

A Hamming code encoding and arranging method, comprising the steps of:
(A) dividing an original data into N groups of to-be-encoded data and performing (c, a) Hamming code encoding on the N groups of to-be-encoded data, respectively, to generate corresponding N groups of codes thereby producing corresponding N groups of encoded data, wherein N is equal to Round(X/a), X represents a number of bits of the original data, a represents a number of bits of one group of to-be-encoded data, Round( ) represents an integer function, c represents a number of bits of one group of encoded data and c is equal to a+b, b represents a number of bits of one group of codes and is a minimum value satisfying 2b>=a+b+1, where X, N, a, b, c are each an integer greater than 0;
(B) for the N groups of encoded data, extracting p-bit encoded data in each group of encoded data, and successively arranging N groups of extracted p-bit encoded data, where p is an integer greater than 0 and p is smaller than or equal to c;
(C) when a number of bits of un-extracted encoded data remaining in each of the N groups of encoded data is greater than or equal to p, extracting p-bit encoded data in each group of the encoded data, and successively arranging N groups of extracted p-bit encoded data; and
(D) when there is no un-extracted encoded data remaining in each of the N groups of encoded data, generating rearranged encoded data according to arrangement in step (B) and step (C); or when there is only q-bit un-extracted encoded data remaining in each of the N groups of encoded data, extracting q-bit encoded data in each of the N groups of encoded data, and successively arranging N groups of extracted q-bit encoded data so as to generate the rearranged encoded data, where q is an integer greater than 0 and smaller than p.

### Claim 2 (depends on 1)

The Hamming code encoding and arranging method as claimed in claim 1, wherein, in step (A), the N groups of encoded data are generated by combining the N groups of to-be-encoded data with the corresponding N groups of codes, respectively.

### Claim 3

The Hamming code encoding and arranging method as claimed in claimed 1, wherein the p-bit encoded data is continuous encoded data from low bit to high bit.

### Claim 4 (depends on 1)

The Hamming code encoding and arranging method as claimed in claim 1, wherein, in step (A), a parity bit is added to each group of encoded data.

### Claim 5 (depends on 1)

The Hamming code encoding and arranging method as claimed in claim 1, wherein the rearranged encoded data is stored in a storage device.

### Claim 6 (depends on 1)

The Hamming code encoding and arranging method as claimed in claim 1, wherein the (c, a) Hamming code is a (7, 4) Hamming code.

### Claim 7 (depends on 6)

The Hamming code encoding and arranging method as claimed in claim 6, wherein p is equal to 1.

### Claim 8

The Hamming code encoding and arranging method as claimed in claimed 6, wherein p is equal to 2.

### Claim 9 (depends on 6)

The Hamming code encoding and arranging method as claimed in claim 6, wherein p is equal to 4.

### Claim 10 (depends on 6)

The Hamming code encoding and arranging method as claimed in claim 6, wherein p is equal to 7.

### Claim 11

A storage device detection method for detecting a storage device using a Hamming code encoding and arranging method including the steps of:
dividing an original data into N groups of to-be-encoded data and performing (c, a) Hamming code encoding on the N groups of to-be-encoded data, respectively, to generate corresponding N groups of codes thereby producing corresponding N groups of encoded data, wherein N is equal to Round(X/a), X represents a number of bits of the original data, a represents a number of bits of one group of to-be-encoded data, Round( ) represents an integer function, c represents a number of bits of one group of encoded data and c is equal to a+b, b represents a number of bits of one group of codes and is a minimum value satisfying 2b>=a+b+1, where X, N, a, b, c are each an integer greater than 0 and p is smaller than or equal to c; for the N groups of encoded data, extracting p-bit encoded data in each group of encoded data, and successively arranging N groups of extracted p-bit encoded data, where p is an integer greater than 0 and p is smaller than or equal to c; when a number of bits of un-extracted encoded data remaining in each of the N groups of encoded data is greater than or equal to p, extracting p-bit encoded data in each group of the encoded data, and successively arranging N groups of extracted p-bit encoded data; and when there is no un-extracted encoded data remaining in each of the N groups of encoded data, generating rearranged encoded data accordingly; or when there is only q-bit un-extracted encoded data remaining in each of the N groups of encoded data, extracting q-bit encoded data in each of the N groups of encoded data, and successively arranging N groups of extracted q-bit encoded data so as to generate the rearranged encoded data, where q is an integer greater than 0 and smaller than p; the storage device detection method comprising:
selecting multiple different values of p from a range of integer greater than 0 and smaller than or equal to c to define multiple types of Hamming code encoding and arranging methods according to the multiple different values of p, wherein the multiple types of Hamming code encoding and arranging methods correspond to the multiple different values of p, respectively;
using the multiple types of Hamming code encoding and arranging methods in sequence to perform a self-test on the storage device,
wherein, when the self-test for a type of Hamming code encoding and arranging method is successful, the Hamming code encoding and arranging method of the type is recorded in the storage device and the self-test is ended and, when the self-test for all types of Hamming code encoding and arranging methods fails, the storage device is determined to be defective.

### Claim 12 (depends on 11)

The storage device detection method as claimed in claim 11, wherein, when the (c, a) Hamming code is a (7, 4) Hamming code, the multiple different values of p include 1, 2, 4 and 7.
