Skip to content

Instantly share code, notes, and snippets.

@maxsimych
Last active September 17, 2024 10:40
Show Gist options
  • Save maxsimych/8bf96b96fd242576fc8001bf65618c40 to your computer and use it in GitHub Desktop.
Save maxsimych/8bf96b96fd242576fc8001bf65618c40 to your computer and use it in GitHub Desktop.

Revisions

  1. maxsimych revised this gist Sep 17, 2024. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion gistfile1.txt
    Original file line number Diff line number Diff line change
    @@ -1 +1 @@
    const toBinStr = (num) => (num >>> 0).toString(2).padStart(32,'0').match(/.{1,8}/g).join(' ')
    const toBinStr = num => (num >>> 0).toString(2).padStart(32,'0').match(/.{1,8}/g).join(' ')
  2. maxsimych created this gist Sep 17, 2024.
    1 change: 1 addition & 0 deletions gistfile1.txt
    Original file line number Diff line number Diff line change
    @@ -0,0 +1 @@
    const toBinStr = (num) => (num >>> 0).toString(2).padStart(32,'0').match(/.{1,8}/g).join(' ')