eight_bit_computer.export module¶
Functionality to convert data other package friendly formats.
-
eight_bit_computer.export.
bitstrings_to_logisim
(bitstrings)[source]¶ Convert bitstrigs to a logising RAM/ROM file format.
Used to convert ROMs and machine code.
Parameters: bitstrings (list(str)) – List of bitstrings to convert to a logisim friendly format. Returns: String ready to be written to a file. Return type: str
-
eight_bit_computer.export.
chunker
(seq, chunk_size)[source]¶ Take a larger sequence and split it into smaller chunks.
E.g.:
chunker([0,1,2,3,4,5], 4) -> [0,1,2,3], [4,5]
Parameters: - seq (list) – List of things to chunk up
- chunk_size (int) – How big each chunk should be.
Returns: Generator that yields each chunk.
Return type: generator