{"id":1127,"date":"2016-01-16T11:56:30","date_gmt":"2016-01-16T11:56:30","guid":{"rendered":"http:\/\/coolt.ch\/notizen\/?p=1127"},"modified":"2016-01-16T11:56:30","modified_gmt":"2016-01-16T11:56:30","slug":"binary-file-to-ascii-file","status":"publish","type":"post","link":"https:\/\/coolt.ch\/notizen\/binary-file-to-ascii-file\/","title":{"rendered":"Binary File to Ascii File"},"content":{"rendered":"<p>edid.bin<\/p>\n<p>Will man den Inhalt \u00fcberpr\u00fcfen, braucht man die Konversion in Ascii.<\/p>\n<p><strong>Programms<a href=\"http:\/\/linuxcommand.org\/man_pages\/hexdump1.h\"> hexdump<\/a> <\/strong>(Alternative ist xxd)<strong><br \/>\n<\/strong><\/p>\n<p>Pro Ziffer werden 4 Bit dargestellt. 1 Byte\u00a0 hat zwei Ziffern. Bzw. aus 8 Bit entstehen 2 Ziffern.<\/p>\n<pre class=\"lang:sh decode:true\">hexdump binaryTree.bin<\/pre>\n<pre class=\"lang:sh decode:true\"><strong>0000000<\/strong> 0008 0001 0000 0002 000a 0000 0007 0003\r\n<strong>0000010<\/strong> 0000 000f 0004 0000 0005 0010 0000 0011\r\n<strong>0000020<\/strong> 0006 0000 0000 0000 0100 0000 0000 0101<\/pre>\n<ul>\n<li>Jedes Zeichen entspricht einem Byte. <span class=\"lang:sh decode:true crayon-inline \">0008<\/span>\u00a0 sind somit 4 Bytes bzw.<span class=\"lang:sh decode:true crayon-inline \"> 0x00<\/span>\u00a0 und <span class=\"lang:sh decode:true crayon-inline\">0x08<\/span>.<\/li>\n<li>Vorne <strong>Anzahl Hexzahlen<\/strong>:\u00a0 Zeile hat 16 hex-Zeichen (pro Block zwei Hexzahlen)<\/li>\n<li>Ausgabe ist Big Endian (wie Zahl geschrieben wird). Zurst die h\u00f6herwertigen Bytes.<br \/>\nbin\u00e4r:\u00a0 00000000 00001000\u00a0 =&gt;\u00a0 0x 00 08<\/li>\n<\/ul>\n<p><strong>Ohne Hexzahlen<\/strong><\/p>\n<pre class=\"lang-sh prettyprint prettyprinted\"><code><span class=\"pln\">hexdump  <\/span><strong><span class=\"pun\">-<\/span><span class=\"pln\">e <\/span><span class=\"str\">'16\/1 \"%02x \" \"\\n\"'<\/span><\/strong><span class=\"pln\">   binaryTree<\/span><span class=\"pun\">.<\/span><span class=\"pln\">bin<\/span><\/code><\/pre>\n<pre class=\"lang:sh decode:true \">08 00 01 00 00 00 02 00 0a 00 00 00 07 00 03 00\r\n00 00 0f 00 04 00 00 00 05 00 10 00 00 00 11 00<\/pre>\n<ul>\n<li>Ausgabe ist LittelEndian<br \/>\nH\u00f6herwertige Zahlen kommen an zweiter Stelle.<br \/>\nZuerst die tiefen Bytes. (zuerst 08)<br \/>\nbin\u00e4r:\u00a0 00000000 00001000\u00a0 =&gt;\u00a0 0x 08 00<\/li>\n<\/ul>\n","protected":false},"excerpt":{"rendered":"<p>edid.bin Will man den Inhalt \u00fcberpr\u00fcfen, braucht man die Konversion in Ascii. Programms hexdump (Alternative ist xxd) Pro Ziffer werden 4 Bit dargestellt. 1 Byte\u00a0 hat zwei Ziffern. Bzw. aus 8 Bit entstehen 2 Ziffern. hexdump binaryTree.bin 0000000 0008 0001 0000 0002 000a 0000 0007 0003 0000010 0000 000f 0004 0000 0005 0010 0000 0011 &hellip; <a href=\"https:\/\/coolt.ch\/notizen\/binary-file-to-ascii-file\/\" class=\"more-link\"><span class=\"screen-reader-text\">Binary File to Ascii File<\/span> weiterlesen<\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":[],"categories":[1],"tags":[],"_links":{"self":[{"href":"https:\/\/coolt.ch\/notizen\/wp-json\/wp\/v2\/posts\/1127"}],"collection":[{"href":"https:\/\/coolt.ch\/notizen\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/coolt.ch\/notizen\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/coolt.ch\/notizen\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/coolt.ch\/notizen\/wp-json\/wp\/v2\/comments?post=1127"}],"version-history":[{"count":6,"href":"https:\/\/coolt.ch\/notizen\/wp-json\/wp\/v2\/posts\/1127\/revisions"}],"predecessor-version":[{"id":1133,"href":"https:\/\/coolt.ch\/notizen\/wp-json\/wp\/v2\/posts\/1127\/revisions\/1133"}],"wp:attachment":[{"href":"https:\/\/coolt.ch\/notizen\/wp-json\/wp\/v2\/media?parent=1127"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/coolt.ch\/notizen\/wp-json\/wp\/v2\/categories?post=1127"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/coolt.ch\/notizen\/wp-json\/wp\/v2\/tags?post=1127"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}