{"id":2668,"date":"2016-03-17T21:46:51","date_gmt":"2016-03-17T21:46:51","guid":{"rendered":"https:\/\/stevepedwards.today\/DebianAdmin\/?p=2668"},"modified":"2025-12-30T18:35:13","modified_gmt":"2025-12-30T23:35:13","slug":"encapsulation-from-bits-to-gigabytes-in-200-years-2","status":"publish","type":"post","link":"https:\/\/stevepedwards.today\/DebianAdmin\/encapsulation-from-bits-to-gigabytes-in-200-years-2\/","title":{"rendered":"Encapsulation &#8211; From Bits to Gigabytes in 200 Years"},"content":{"rendered":"<div class=\"pvc_clear\"><\/div>\n<p id=\"pvc_stats_2668\" class=\"pvc_stats all  \" data-element-id=\"2668\" style=\"\"><i class=\"pvc-stats-icon medium\" aria-hidden=\"true\"><svg aria-hidden=\"true\" focusable=\"false\" data-prefix=\"far\" data-icon=\"chart-bar\" role=\"img\" xmlns=\"http:\/\/www.w3.org\/2000\/svg\" viewBox=\"0 0 512 512\" class=\"svg-inline--fa fa-chart-bar fa-w-16 fa-2x\"><path fill=\"currentColor\" d=\"M396.8 352h22.4c6.4 0 12.8-6.4 12.8-12.8V108.8c0-6.4-6.4-12.8-12.8-12.8h-22.4c-6.4 0-12.8 6.4-12.8 12.8v230.4c0 6.4 6.4 12.8 12.8 12.8zm-192 0h22.4c6.4 0 12.8-6.4 12.8-12.8V140.8c0-6.4-6.4-12.8-12.8-12.8h-22.4c-6.4 0-12.8 6.4-12.8 12.8v198.4c0 6.4 6.4 12.8 12.8 12.8zm96 0h22.4c6.4 0 12.8-6.4 12.8-12.8V204.8c0-6.4-6.4-12.8-12.8-12.8h-22.4c-6.4 0-12.8 6.4-12.8 12.8v134.4c0 6.4 6.4 12.8 12.8 12.8zM496 400H48V80c0-8.84-7.16-16-16-16H16C7.16 64 0 71.16 0 80v336c0 17.67 14.33 32 32 32h464c8.84 0 16-7.16 16-16v-16c0-8.84-7.16-16-16-16zm-387.2-48h22.4c6.4 0 12.8-6.4 12.8-12.8v-70.4c0-6.4-6.4-12.8-12.8-12.8h-22.4c-6.4 0-12.8 6.4-12.8 12.8v70.4c0 6.4 6.4 12.8 12.8 12.8z\" class=\"\"><\/path><\/svg><\/i> <img loading=\"lazy\" decoding=\"async\" width=\"16\" height=\"16\" alt=\"Loading\" src=\"https:\/\/stevepedwards.today\/DebianAdmin\/wp-content\/plugins\/page-views-count\/ajax-loader-2x.gif\" border=0 \/><\/p>\n<div class=\"pvc_clear\"><\/div>\n<p>Encapsulation comes in many forms and in my opinion is often overlooked and under-reported as a major concept in many IT, telecoms, computer, networking or other binary based technical courses.<\/p>\n<p>We don't even teach visualising \"encapsulation\" with the perfect explanatory image of a Russian Doll, yet most children are familiar with that.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter\" src=\"https:\/\/stevepedwards.today\/DebianAdmin\/wp-content\/uploads\/2016\/03\/031716_2146_Encapsulati1.jpg\" alt=\"\" width=\"1000\" height=\"750\" align=\"left\" \/>For me, encapsulation is about the most important concept in computing, as our language is also based on it and follows <em><strong>rules or protocols;<\/strong><\/em> letters make words, words make sentences, sentences make paragraphs, to pages, chapters, books, libraries and so on.<\/p>\n<p>Our mathematical systems are described by it; decimal units are grouped in tens, tens into hundreds etc.<\/p>\n<p>Encapsulation of data organised as useful information - a foundational database concept - exactly the concept we used to create computer systems and be able to program them to be useful tools in the first place.<\/p>\n<p>Data encapsulation occurs from L7 to L1 and decapsulation from L1 to L7.<\/p>\n<table>\n<thead>\n<tr>\n<th>OSI Layer<\/th>\n<th>Term<\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<td>Layer 7 \u2013 Application L7 PDU (Protocol Data Unit)<\/td>\n<td>Data (Application and Service Advertisement (e.g. a Net printer), POP3, IMAP - (NOT the actual App like Outlook!)<\/td>\n<\/tr>\n<tr>\n<td>Layer 6 \u2013 Presentation L6 PDU<\/td>\n<td>Data (data formatting, encryption (TLS, SSL), ASCII, JPG, PNG, MP4, Script languages)<\/td>\n<\/tr>\n<tr>\n<td>Layer 5 \u2013 Session L5 PDU<\/td>\n<td>Data (H323, NetBIOS, RTP, PPTP, CHAP )<\/td>\n<\/tr>\n<tr>\n<td>Layer 4 \u2013 Transport<\/td>\n<td>Segments (TCP)\/Datagrams (UDP)<\/td>\n<\/tr>\n<tr>\n<td>Layer 3 \u2013 Network<\/td>\n<td>Packets<\/td>\n<\/tr>\n<tr>\n<td>Layer 2 \u2013 Data Link<\/td>\n<td>Frames<\/td>\n<\/tr>\n<tr>\n<td>Layer 1 \u2013 Physical<\/td>\n<td>Bits<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p>If you don't understand the difference between data and information, read my 2nd year degree-level Databases research paper in the top menu links.<\/p>\n<p>The basic principle of encapsulation - smaller units of something being grouped into fixed size, larger and larger containers for ease of transport and administration - is nothing new, if you think of how goods are transported round the world every day (letters in envelopes, envelopes in packets, packets in parcels, parcels in boxes etc.) - so why is this important concept and the protocols that define those methods left to the side so much, if broached at all in many beginner-level tech courses, where a brief explanation of data accumulation (storage in some form no matter how long or short the time period) should be obvious to mention because it's everywhere in digital computing in some form at every moment!?<\/p>\n<p>Without encapsulation and the protocols that count and order them according to design requirements, everything is just a collection of 1s and 0s either streamed, or held in a static magnetic or electrical field.<\/p>\n<p>So how are these bits structured and re-arranged to have meaning in human reality?<\/p>\n<p>The Database paper outlines a <em>database<\/em>\u00a0<em>specific<\/em> set of methods, but there are many other ways - depending on design\u00a0 requirements - as you would expect if data is \"everywhere\" - and nowadays, it pretty much is!<\/p>\n<p>I'd define the Internet that way - available everywhere - if you have the right gear, anywhere on the planet, you can connect to a satellite at least.<\/p>\n<p>What are some ways encapsulation can be shown more specifically in the various systems that make up a computer environment?<\/p>\n<p>In most systems, bits are most commonly stored either on a hard drive or memory chips.<\/p>\n<p>First, an example of hard drive encapsulation.<\/p>\n<p>In a directory or file listing using ls -l of various formats, there's a lesser-known column, before the <strong><em>modification date<\/em><\/strong>, that states numerical info on those files, but what is it?<\/p>\n<p>You could google and get an answer immediately, but let's see if a Linux command jigsaw puzzle approach can work with research, to learn some new commands in the process, by seeing if <span style=\"color: #0000ff;\">man<\/span> can supply info on relevant terms.<\/p>\n<p>First, create an empty file:<\/p>\n<p>Mint5630 SEDAWK # <span style=\"color: #0000ff;\">touch testfile.txt<\/span><\/p>\n<p>Mint5630 SEDAWK # <span style=\"color: #0000ff;\">ls -l testfile.txt <\/span><\/p>\n<p><span style=\"color: red;\">-rw-r--r-- 1 stevee stevee <strong>0<\/strong> Oct 3 16:28 testfile.txt<\/span><\/p>\n<p>First, briefly, the other better known fields in that output are:<\/p>\n<p>file type (-);<\/p>\n<p>read,write,exe (rwx) permissions (x3) for user,group,others; file links (1); user (owner, stevee); group (membership, stevee); <strong>??(0)<\/strong>; modification time (date);<\/p>\n<p>filename<\/p>\n<p>So what does this number <strong>0<\/strong> mean before the <strong>modification time\/date <\/strong>stamp?Is it the same as \"allocated size in blocks\" as stated in man, as we know it's an empty file?<\/p>\n<p><span style=\"color: #0000ff;\">man ls<\/span><\/p>\n<p><span style=\"color: red;\">-s, --size<\/span><\/p>\n<p><span style=\"color: red;\">print the allocated size of each file, in blocks<\/span><\/p>\n<p>stevee@Mint5630 ~ $<span style=\"color: #0000ff;\"> ls -ls testfile.txt<\/span><\/p>\n<p><span style=\"color: red;\"><strong>0<\/strong> -rw-r--r-- 1 stevee stevee <strong>0 <\/strong>Oct 3 16:28 testfile.txt<\/span><\/p>\n<p>No, because this gives a new field (0) at the start, though the number is the same;<\/p>\n<p>so has it just been repeated or is it something else? Unix wouldn't be pointlessly repetitive in that way.<\/p>\n<p>If I append some data to the empty file, say, the A character, without a new line character, will anything change?:<\/p>\n<p>stevee@Mint5630 ~ $ <span style=\"color: #0000ff;\">echo -n A &gt;&gt; testfile.txt <\/span><\/p>\n<p>stevee@Mint5630 ~ $ <span style=\"color: #0000ff;\">ls -ls testfile.txt <\/span><\/p>\n<p><span style=\"color: red;\"><strong>4<\/strong> -rw-r--r-- 1 stevee stevee <strong>1<\/strong> Oct 3 16:43 testfile.txt<\/span><\/p>\n<p>Ah, now there is an indication of something else - but what?<\/p>\n<p>The 0 changes to a 1, of whatever it is. A bit?; byte?; block? - and the first 0 changes to a 4<\/p>\n<p>What does \"human readable\" say?<\/p>\n<p>stevee@Mint5630 ~ $ <span style=\"color: #0000ff;\">ls -lsh testfile.txt <\/span><\/p>\n<p><span style=\"color: red;\">4.0K -rw-r--r-- 1 stevee stevee 1 Oct 3 16:43 testfile.txt<\/span><\/p>\n<p>Seems the 1 does not measure a standard data bit size multiple in terms of bits or bytes etc., but the 4K does.<\/p>\n<p>If the smallest unit of data is a 1 or 0, or a \"bit\", what are the various ways they can accumulate and be named as data-bit multiples? It turns out, depending on what they are being used for to describe useful information say characters, numbers, packets etc. - they can accumulate in many ways with many different names, for both historic and current technological reasons.<\/p>\n<p>Better find out what each of the most fundamental bits are first, then what fundamental groupings they can become regardless of what medium they are stored on or streamed across.<\/p>\n<p><span style=\"color: #00ff00;\"><a style=\"color: #00ff00;\" href=\"https:\/\/en.wikipedia.org\/wiki\/Bit\"><span style=\"text-decoration: underline;\">https:\/\/en.wikipedia.org\/wiki\/Bit<\/span><\/a><\/span><\/p>\n<h2><em>\"The bit is not defined in the International System of Units (SI). However, the International Electrotechnical Commission issued standard IEC 60027, which specifies that the symbol for binary digit should be bit, and this should be used in all multiples, such as kbit, for kilobit.[7] However, the lower-case letter b is widely used as well and was recommended by the IEEE 1541 Standard (2002). In contrast, the upper-case letter B is the standard and customary symbol for byte\u00a6 <\/em><\/h2>\n<h2><em>For convenience of representing commonly reoccurring groups of bits in information technology, several units of information have traditionally been used. The most common is the unit byte, coined by Werner Buchholz in July 1956, which historically was used to represent the number of bits used to encode a single character of text (until UTF-8 multibyte encoding took over) in a computer[8][9] and for this reason it was used as the basic addressable element in many computer architectures. <\/em><\/h2>\n<h2><span style=\"font-family: Arial; font-size: 10pt;\"><em>The trend in hardware design converged on the most common implementation of using eight bits per byte, as it is widely used today. However, because of the ambiguity of relying on the underlying hardware design, the unit octet was defined to explicitly denote a sequence of eight bits.\"<\/em><\/span><\/h2>\n<p>So, small k + small b = kilobit = 1000 bits<\/p>\n<p>Large B = byte = octet = 8 bits<\/p>\n<p><span style=\"color: #00ff00;\"><a style=\"color: #00ff00;\" href=\"https:\/\/www.tldp.org\/LDP\/sag\/html\/filesystems.html\"><span style=\"text-decoration: underline;\">https:\/\/www.tldp.org\/LDP\/sag\/html\/filesystems.html<\/span><\/a><\/span><\/p>\n<p><em><span style=\"font-size: 12pt;\">\"Most UNIX filesystem types have a similar general structure, although the exact details vary quite a bit. The central concepts are superblock, inode,<strong>data block<\/strong>, directory block, and indirection block. The superblock contains information about the filesystem as a whole, such as its size (the exact information here depends on the filesystem). An inode contains all information about a file, except its name. The name is stored in the directory, together with the number of the inode. <strong>A directory entry consists of a filename<\/strong> and the number of the inode which represents the file. <strong>The inode contains the numbers of several data blocks, which are used to store the data in the file.<\/strong> There is space only for a few data block numbers in the inode, however, and if more are needed, more space for pointers to the data blocks is allocated dynamically. These dynamically allocated blocks are indirect blocks; the name indicates that in order to find the data block, one has to find its number in the indirect block first\u00a6 <\/span><\/em><\/p>\n<p><strong>5.10.5. Filesystem block size<\/strong><\/p>\n<p><span style=\"font-size: 12pt;\"><em><span style=\"font-family: Times New Roman;\">The block size specifies size that the filesystem will use to read and write data. Larger block sizes will help improve disk I\/O performance when using large files, such as databases. This happens because the disk can read or write data for a longer period of time before having to search for the next block. On the downside, if you are going to have a lot of smaller files on that filesystem, like the <\/span><span style=\"font-family: Courier New;\">\/etc<\/span><span style=\"font-family: Times New Roman;\">, there the potential for a lot of wasted disk space. For example, <strong>if you set your block size to 4096, or 4K, and you create a file that is 256 bytes in size, it will still consume 4K<\/strong> of space on your harddrive. For one file that may seem trivial, but when your filesystem contains hundreds or thousands of files, this can add up.\"<\/span><\/em><\/span><\/p>\n<p>So, it seems my testfile.txt - may be made up of one or more data blocks, each of a size that depends on what has been set by the file system type in current use, and the amount of those blocks used for the file space indicates the total size allocated on disk.<\/p>\n<p>How do you find out what the default block size of your file system is? First, you have to know your FS type:<\/p>\n<p>stevee@Mint5630 ~ $ <span style=\"color: #0000ff;\">sudo blkid <\/span><\/p>\n<p><span style=\"color: red;\">\/dev\/sda1: UUID=\"436a55a9-f610-45f6-866d-a72bfe10ff74\" TYPE=\"<strong>ext4<\/strong>\"<\/span><\/p>\n<p><span style=\"color: #0000ff;\">man ext4<\/span><\/p>\n<p><span style=\"color: red;\">DESCRIPTION<\/span><\/p>\n<p><span style=\"color: red;\">The second, third, and fourth extended file systems, or ext2, ext3, and<\/span><\/p>\n<p><span style=\"color: red;\">ext4 as they are commonly known, are Linux file systems that have his<\/span><span style=\"color: red;\">torically <\/span><\/p>\n<p><span style=\"color: red;\">been the <strong>default file system for many Linux distributions.<\/strong> <\/span><\/p>\n<p><span style=\"color: red;\">This ext4 feature allows the mapping of logical<\/span><\/p>\n<p><span style=\"color: red;\">block numbers for a particular inode to physical<\/span><\/p>\n<p><span style=\"color: red;\">blocks on the storage device to be stored using an<\/span><\/p>\n<p><span style=\"color: red;\">extent tree, which is a more efficient data struc<\/span><\/p>\n<p><span style=\"color: red;\">ture than the traditional indirect block scheme used<\/span><\/p>\n<p><span style=\"color: red;\">by the ext2 and ext3 file systems. <strong>The use of the<\/strong><\/span><\/p>\n<p><span style=\"color: red;\"><strong>extent tree decreases metadata block overhead,<\/strong><\/span><\/p>\n<p><span style=\"color: red;\"><strong>improves file system performance and decreases the<\/strong><\/span><\/p>\n<p><span style=\"color: red;\"><strong>needed to run e2fsck(8) on the file system.<\/strong> <\/span><\/p>\n<p>I can find out the sector size and block size of my hard drive:<\/p>\n<p>stevee@Mint5630 ~ $ <span style=\"color: #0000ff;\">sudo blockdev --report \/dev\/sda1<\/span><\/p>\n<p><span style=\"color: red;\">RO RA <strong> SSZ BSZ <\/strong> StartSec Size Device<\/span><\/p>\n<p><span style=\"color: red;\">rw 256 <strong>512 4096<\/strong> 2048 37860933632 \/dev\/sda1<\/span><\/p>\n<p>Seems the actual physical disk sector size is 512 bytes long, with 8 of those creating an EXT4 blocksize of 4096 bytes.<\/p>\n<p>So now, it seems I found enough info to assume that my tiny, 1 character content testfile.txt occupies 1\u00a0<strong><em>ext4 file system\u00a0<\/em><\/strong>block (the minimum possible amount to store actual data, rather than mark it as 0 blocks, or empty) of data, of 4096 bytes or 4K space size that has been allocated for it, even if it does not fill it.<\/p>\n<p>Indeed, this is what the ls -lsh output showed above:<\/p>\n<p>stevee@Mint5630 ~ $ <span style=\"color: #0000ff;\">ls -lsh testfile.txt <\/span><\/p>\n<p><span style=\"color: red;\"><strong>4.0K<\/strong> -rw-r--r-- 1 stevee stevee <strong>1<\/strong> Oct 3 16:43 testfile.txt<\/span><\/p>\n<p>Initially, the sector allocation size does not seem to fit with what the <strong><em>default<\/em><\/strong> output of <span style=\"color: #0000ff;\">stat<\/span> says:<\/p>\n<p>stevee@Mint5630 ~ $ <span style=\"color: #0000ff;\">sudo stat testfile.txt <\/span><\/p>\n<p><span style=\"color: red;\">File: 'testfile.txt'<\/span><\/p>\n<p><span style=\"color: red;\"><strong>Size: 1 <\/strong>\u00a0\u00a0\u00a0\u00a0<strong>Blocks: 8 \u00a0 IO Block: 4096<\/strong> regular file<\/span><\/p>\n<p><span style=\"color: red;\">Device: 801h\/2049d\u00a0\u00a0\u00a0\u00a0Inode: 535929 Links: 1<\/span><\/p>\n<p><span style=\"color: red;\">Access: (0644\/-rw-r--r--) Uid: ( 1000\/ stevee) Gid: ( 1000\/ stevee)<\/span><\/p>\n<p><span style=\"color: red;\">Access: 2015-10-02 23:15:01.695360490 +0100<\/span><\/p>\n<p><span style=\"color: red;\">Modify: 2015-10-02 23:14:57.163233200 +0100<\/span><\/p>\n<p><span style=\"color: red;\">Change: 2015-10-02 23:14:57.163233200 +0100<\/span><\/p>\n<p><span style=\"color: red;\">Birth: -<\/span><\/p>\n<p>This implies 8 blocks of 4096 bytes each, or 2^15 or 32768 bytes, or 32K of space allocated which there obviously is not - so what is wrong here?<\/p>\n<p>This seems to be the different stat definition of a \"block\", as different from the ext4 \"block\" shown earlier. A difference between the base <strong>hard drive sector<\/strong> size block of 512 bytes, and how the ext4 default filesystem has been organised, as defined for ext 4 above in <em>file system<\/em> block size of 4096 bytes or 4K bytes. This would then make sense, as 8 blocks of 512 bytes per sector, make 1 file system IO block of 4096 bytes.<\/p>\n<p>Be aware of the base sector size of a hard drive, organised (as multiples) to form a particular file system IO block, of given size. One FS block <strong>encapsulates<\/strong> 8 drive sectors, to form a larger storage\/transport unit!<\/p>\n<p>We have seen this sector to file system variation already with the dd command Posts, where you can change the IO blocksize to suit your hardware's optimal performance to speed up copying time:<\/p>\n<p><span style=\"color: #00ff00;\"><a style=\"color: #00ff00;\" href=\"https:\/\/stevepedwards.today\/DebianAdmin\/cool-command-1-dd-progress\/\"><span style=\"text-decoration: underline;\">https:\/\/stevepedwards.today\/DebianAdmin\/cool-command-1-dd-progress\/<\/span><\/a><\/span><\/p>\n<p>Read <span style=\"color: #0000ff;\">info coreutils 'stat invocation'<\/span><\/p>\n<p><span style=\"color: red;\">Due to shell aliases and built-in `stat' functions, using an<\/span><\/p>\n<p><span style=\"color: red;\">unadorned `stat' interactively or in a script may get you different<\/span><\/p>\n<p><span style=\"color: red;\">functionality than that described here. Invoke it via `env' (i.e.,<\/span><\/p>\n<p><span style=\"color: red;\">`env stat ...') to avoid interference from the shell. <\/span><\/p>\n<p><span style=\"color: red;\">`-c'<\/span><\/p>\n<p><span style=\"color: red;\">`--format=FORMAT'<\/span><\/p>\n<p><span style=\"color: red;\">Use FORMAT rather than the default format. FORMAT is<\/span><\/p>\n<p><span style=\"color: red;\">automatically newline-terminated, so running a command like the<\/span><\/p>\n<p><span style=\"color: red;\">following with two or more FILE operands produces a line of output<\/span><\/p>\n<p><span style=\"color: red;\">for each operand:<\/span><\/p>\n<p><span style=\"color: red;\">$ stat --format=%d:%i \/ \/usr<\/span><\/p>\n<p><span style=\"color: red;\">2050:2<\/span><\/p>\n<p><span style=\"color: red;\">2057:2<\/span><\/p>\n<p><span style=\"color: red;\">The valid FORMAT directives for files with `--format' and `--printf'<\/span><\/p>\n<p><span style=\"color: red;\">are:<\/span><\/p>\n<p><span style=\"color: red;\">* %b - Number of blocks allocated (see `%B')<\/span><\/p>\n<p><span style=\"color: red;\">* %B - The size in bytes of each block reported by `%b'<\/span><\/p>\n<p>So now, if you use the --format option with the %b or %B, things become clearer again, as sector block sizes and amount are stated by the %b and %B formats:<\/p>\n<p>Mint5630 stevee # <span style=\"color: #0000ff;\">stat --format %b testfile.txt <\/span><\/p>\n<p><span style=\"color: red;\">8<\/span><\/p>\n<p>Mint5630 stevee # <span style=\"color: #0000ff;\">stat --format %B testfile.txt <\/span><\/p>\n<p><span style=\"color: red;\">512<\/span><\/p>\n<p>This also gives the same values of 8 sector blocks x 512 bytes = 4096 bytes or 4K as ls -lsh does for this file.<\/p>\n<p>So far, all that explains the disk and file system storage allocated to store the file, but what about the file contents itself?<\/p>\n<p>Interestingly at this point, the <span style=\"color: #0000ff;\">nemo-terminal<\/span> shows two different values for testfile.txt size. The command line shows IO block allocation, and the GUI shows the file contents size 1 character per byte? Handy if so!<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter\" src=\"https:\/\/stevepedwards.today\/DebianAdmin\/wp-content\/uploads\/2016\/03\/031716_2146_Encapsulati2.png\" alt=\"\" width=\"842\" height=\"320\" align=\"left\" \/><\/p>\n<p>This allows a theory check for whether each character contained in a file IS a byte in size. So let's append some more to it:<\/p>\n<p>stevee@AMDA8 ~\/Documents $ <span style=\"color: #0000ff;\">echo -n BCDEFGH &gt;&gt; testfile.txt <\/span><\/p>\n<p>stevee@AMDA8 ~\/Documents $ <span style=\"color: #0000ff;\">ls -alsh testfile.txt <\/span><\/p>\n<p><span style=\"color: red;\">4.0K -rw-r--r-- 1 stevee stevee 8 Oct 6 18:57 testfile.txt<\/span><\/p>\n<p>Sure enough above, the IO block size of 4k remains unfilled, but the GUI shows 8 bytes total after the addition of another 7 characters. Seems each ASCII character is a byte (8 bits) in size!<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter\" src=\"https:\/\/stevepedwards.today\/DebianAdmin\/wp-content\/uploads\/2016\/03\/031716_2146_Encapsulati3.png\" alt=\"\" width=\"719\" height=\"297\" align=\"left\" \/><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter\" src=\"https:\/\/stevepedwards.today\/DebianAdmin\/wp-content\/uploads\/2016\/03\/031716_2146_Encapsulati4.png\" alt=\"\" width=\"844\" height=\"256\" \/>Not convinced?<\/p>\n<p><span style=\"color: #0000ff;\">rm -v testfile.txt<\/span><br \/>\n<span style=\"color: #ff0000;\">removed \u02dctestfile.txt,<\/span><br \/>\n<span style=\"color: #0000ff;\">for x in {1..4096}; do echo -n A &gt;&gt; testfile.txt; <\/span><br \/>\n<span style=\"color: #0000ff;\">done<\/span><br \/>\n<span style=\"color: #0000ff;\">ls -als testfile.txt<\/span><br \/>\n<span style=\"color: #ff0000;\">4 -rw-r--r-- 1 stevee stevee <strong>4096<\/strong> Aug 8 11:29 testfile.txt<\/span><\/p>\n<p><a href=\"https:\/\/stevepedwards.today\/DebianAdmin\/wp-content\/uploads\/2016\/03\/4096k.png\"><img loading=\"lazy\" decoding=\"async\" class=\"wp-image-3870 aligncenter\" src=\"https:\/\/stevepedwards.today\/DebianAdmin\/wp-content\/uploads\/2016\/03\/4096k.png\" alt=\"4096k.png\" width=\"731\" height=\"279\" \/><\/a><\/p>\n<p>The programs od and hexdump can output characters in octal\/hex\/denary bytes, and much more if you want to see what octet numbers relate to ASCII characters etc.<\/p>\n<p><span style=\"color: red;\">-b One-byte octal display. Display the input offset in hexadecimal,<\/span><\/p>\n<p><span style=\"color: red;\">followed by sixteen space-separated, three column, zero-filled,<\/span><\/p>\n<p><span style=\"color: red;\">bytes of input data, in octal, per line. <\/span><\/p>\n<p><span style=\"color: red;\">-c One-byte character display. Display the input offset in hexadec<\/span><\/p>\n<p><span style=\"color: red;\">imal, followed by sixteen space-separated, three column, space-<\/span><\/p>\n<p><span style=\"color: red;\">filled, characters of input data per line. <\/span><\/p>\n<p><span style=\"color: red;\">-C Canonical hex+ASCII display. Display the input offset in hexa<\/span><\/p>\n<p><span style=\"color: red;\">decimal, followed by sixteen space-separated, two column, hexa<\/span><\/p>\n<p><span style=\"color: red;\">decimal bytes, followed by the same sixteen bytes in %_p format<\/span><\/p>\n<p><span style=\"color: red;\">enclosed in ``|'' characters. <\/span><\/p>\n<p><span style=\"color: red;\">Calling the command hd implies this option.<\/span><\/p>\n<p><span style=\"color: red;\">-d Two-byte decimal display. Display the input offset in hexadeci<\/span><\/p>\n<p><span style=\"color: red;\">mal, followed by eight space-separated, five column, zero-filled,<\/span><\/p>\n<p><span style=\"color: red;\">two-byte units of input data, in unsigned decimal, per line. <\/span><\/p>\n<p>So now I know that a single ASCII non-control character in this file is only 1 byte in size:<\/p>\n<p>stevee@Mint5630 ~ $<span style=\"color: #0000ff;\">hexdump -bcCd testfile.txt<\/span><\/p>\n<p><a href=\"https:\/\/stevepedwards.today\/DebianAdmin\/wp-content\/uploads\/2016\/03\/hexd.png\"><img loading=\"lazy\" decoding=\"async\" class=\"wp-image-2684 aligncenter\" src=\"https:\/\/stevepedwards.today\/DebianAdmin\/wp-content\/uploads\/2016\/03\/hexd.png\" alt=\"hexd.png\" width=\"807\" height=\"148\" \/><\/a><\/p>\n<p>You can see that \"A\" has the same numerical value = <strong>41<\/strong> or (4 x16 = 64 +1) =\u00a0<strong>65<\/strong> in base 10; = <strong>101<\/strong> (8x8+0+1 = <strong>65<\/strong>) in octal; if you do the maths. stevee@AMDA8 ~\/Desktop $ <span style=\"color: #0000ff;\">od -b testfile.txt<\/span><br \/>\n<span style=\"color: #ff0000;\">0000000 <strong>101<\/strong> 102 103 104 105 106 107 110<\/span><br \/>\n<span style=\"color: #ff0000;\">0000010<\/span><\/p>\n<p>The actual contents of the original file with just the A in it is 3 bytes it seems A Null, the A itself, and a Start Of Heading control character, 0000001. As the other 2 are control characters they don't show in the nemo window size column, just the A does, as 1 byte.<\/p>\n<p>stevee@AMDA8 ~\/Desktop $ <span style=\"color: #0000ff;\">hd -b testfile.txt<\/span><br \/>\n<span style=\"color: #ff0000;\">00000000 41 |A|<\/span><br \/>\n<span style=\"color: #ff0000;\">0000000 101 <\/span><br \/>\n<span style=\"color: #ff0000;\">0000001<\/span><\/p>\n<p>That may be interesting to research as why the other non-printable, control characters of only 1 bit in size each, don't also register a byte length allocation in the GUI?<\/p>\n<p>The first all 0s would make sense not to, as all 0s don't take up \"registered\" disk space as far as I know, but the Start Of Heading character is a 1?<\/p>\n<h2>ASCII control characters (character code 0-31)<\/h2>\n<p>The first 32 characters in the ASCII-table are unprintable control codes and are used to control peripherals such as printers.<\/p>\n<div style=\"text-align: center;\">\n<table style=\"border-collapse: collapse; height: 315px;\" border=\"0\" width=\"845\">\n<colgroup>\n<col style=\"width: 46px;\" \/>\n<col style=\"width: 45px;\" \/>\n<col style=\"width: 45px;\" \/>\n<col style=\"width: 80px;\" \/>\n<col style=\"width: 60px;\" \/>\n<col style=\"width: 94px;\" \/>\n<col style=\"width: 82px;\" \/>\n<col style=\"width: 190px;\" \/><\/colgroup>\n<tbody valign=\"top\">\n<tr style=\"background: #9d2360;\">\n<td valign=\"middle\">\n<p style=\"text-align: center;\"><span style=\"color: black; font-family: Times New Roman; font-size: 12pt;\"><strong>DEC<\/strong><\/span><\/p>\n<\/td>\n<td valign=\"middle\">\n<p style=\"text-align: center;\"><span style=\"color: black; font-family: Times New Roman; font-size: 12pt;\"><strong>OCT<\/strong><\/span><\/p>\n<\/td>\n<td valign=\"middle\">\n<p style=\"text-align: center;\"><span style=\"color: black; font-family: Times New Roman; font-size: 12pt;\"><strong>HEX<\/strong><\/span><\/p>\n<\/td>\n<td valign=\"middle\">\n<p style=\"text-align: center;\"><span style=\"color: black; font-family: Times New Roman; font-size: 12pt;\"><strong>BIN<\/strong><\/span><\/p>\n<\/td>\n<td valign=\"middle\">\n<p style=\"text-align: center;\"><span style=\"color: black; font-family: Times New Roman; font-size: 12pt;\"><strong>Symbol<\/strong><\/span><\/p>\n<\/td>\n<td valign=\"middle\">\n<p style=\"text-align: center;\"><span style=\"color: black; font-family: Times New Roman; font-size: 12pt;\"><strong>HTML Number<\/strong><\/span><\/p>\n<\/td>\n<td valign=\"middle\">\n<p style=\"text-align: center;\"><span style=\"color: black; font-family: Times New Roman; font-size: 12pt;\"><strong>HTML Name<\/strong><\/span><\/p>\n<\/td>\n<td valign=\"middle\"><span style=\"color: black; font-family: Times New Roman; font-size: 12pt;\"><strong>Description<\/strong><\/span><\/td>\n<\/tr>\n<tr style=\"background: blue;\">\n<td style=\"padding: 3px;\" valign=\"middle\">\n<p style=\"text-align: center;\"><span style=\"font-family: Times New Roman; font-size: 12pt;\">0<\/span><\/p>\n<\/td>\n<td style=\"padding: 3px;\" valign=\"middle\">\n<p style=\"text-align: center;\"><span style=\"font-family: Times New Roman; font-size: 12pt;\">000<\/span><\/p>\n<\/td>\n<td style=\"padding: 3px;\" valign=\"middle\">\n<p style=\"text-align: center;\"><span style=\"font-family: Times New Roman; font-size: 12pt;\">00<\/span><\/p>\n<\/td>\n<td style=\"padding: 3px;\" valign=\"middle\">\n<p style=\"text-align: center;\"><span style=\"font-family: Times New Roman; font-size: 12pt;\">00000000<\/span><\/p>\n<\/td>\n<td style=\"padding: 3px;\" valign=\"middle\">\n<p style=\"text-align: center;\"><span style=\"font-family: Times New Roman; font-size: 12pt;\">NUL<\/span><\/p>\n<\/td>\n<td style=\"padding: 3px;\" valign=\"middle\">\n<p style=\"text-align: center;\">\n<\/td>\n<td style=\"padding: 3px;\" valign=\"middle\"><\/td>\n<td style=\"padding: 3px;\" valign=\"middle\"><span style=\"font-family: Times New Roman; font-size: 12pt;\">Null char<\/span><\/td>\n<\/tr>\n<tr style=\"background: blue;\">\n<td style=\"padding: 3px;\" valign=\"middle\">\n<p style=\"text-align: center;\"><span style=\"font-family: Times New Roman; font-size: 12pt;\">1<\/span><\/p>\n<\/td>\n<td style=\"padding: 3px;\" valign=\"middle\">\n<p style=\"text-align: center;\"><span style=\"font-family: Times New Roman; font-size: 12pt;\">001<\/span><\/p>\n<\/td>\n<td style=\"padding: 3px;\" valign=\"middle\">\n<p style=\"text-align: center;\"><span style=\"font-family: Times New Roman; font-size: 12pt;\">01<\/span><\/p>\n<\/td>\n<td style=\"padding: 3px;\" valign=\"middle\">\n<p style=\"text-align: center;\"><span style=\"font-family: Times New Roman; font-size: 12pt;\">00000001<\/span><\/p>\n<\/td>\n<td style=\"padding: 3px;\" valign=\"middle\">\n<p style=\"text-align: center;\"><span style=\"font-family: Times New Roman; font-size: 12pt;\">SOH<\/span><\/p>\n<\/td>\n<td style=\"padding: 3px;\" valign=\"middle\">\n<p style=\"text-align: center;\"><span style=\"font-family: Times New Roman; font-size: 12pt;\">\u0001<\/span><\/p>\n<\/td>\n<td style=\"padding: 3px;\" valign=\"middle\"><\/td>\n<td style=\"padding: 3px;\" valign=\"middle\"><span style=\"font-family: Times New Roman; font-size: 12pt;\">Start of Heading<\/span><\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<\/div>\n<p>What system defines alphabetic or other \"characters\" that are used in an allocated file \"space\"?<\/p>\n<p>To answer that adequately, a history lesson is required, as there are also many other aspects of today's IT systems, such as security, privacy, efficiency, statistical analysis, overhead etc. that were also present, with historical hindsight, even if the implications were not fully realised or intended at inception in more primitive forms of electrical telecoms.<\/p>\n<p>Historically there have been many coded transmission systems, and their origins lie in older forms of \"networking\" as we know it now, or \"signals transmission\" of one sort of another, that were around long before electricity was discovered - smoke signals, drums, bonfire beacons, flag semaphore etc.<\/p>\n<p>These are self-explanatory for the most part, and may just have signified an \"event\" of some sort, but the important thing to note is that the event or non-event represents a form of binary boolean signalling; if x happens, light fire!; if not, don't!<\/p>\n<p>Jumping to electrical signals, the Morse Code superseded the forms of visual (and public) long distance semaphores, to transmit pulses in a circuit, (which also implies a basic level of security as only the sender and receiver know the message).<\/p>\n<p>This system comprised a series of time-dependent pulses - with a base \"protocol\" defining dots and dashes in terms of those time-based pulses - where the duration of a dash equalled 3 dots, and the time between each pulse also equalled a dot duration.<\/p>\n<p><a href=\"https:\/\/en.wikipedia.org\/wiki\/Morse_code\"><strong>https:\/\/en.wikipedia.org\/wiki\/Morse_code<\/strong><\/a><\/p>\n<p>If viewed as an encapsulation method, Morse is interesting as it combines elements of a minimum \"element\" size (a dot or space) and a maximum \"elemental unit combination\" size of 5 dashes separated by 4 dots for the longest character, \"0\":<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter\" src=\"https:\/\/stevepedwards.today\/DebianAdmin\/wp-content\/uploads\/2016\/03\/031716_2146_Encapsulati5.png\" alt=\"\" width=\"889\" height=\"1142\" align=\"left\" \/><\/p>\n<p>If this was seen as time pulses, then character 0 would comprise (5x3 dots) + (4 dots) = 19 dot lengths.<\/p>\n<p>All the number and letter characters could be contained within a larger \"encapsulated unit\" of 19 pulses time duration - or any other term you may like to call them - maybe a box? envelope? parcel? or even...a Packet? a Datagram? a Frame..? a Container?<\/p>\n<p>This \"protocol\" would be \"structurally inefficient\" but \"practically efficient\" in today's technological terms, as the actual \"Morse code design\" had already been optimised for transmission speed (efficiency) by humans, using statistical analysis, so the reason the \"E\" has the shortest duration of 1 dot length - because it is the most common letter in most English language words, so the quickest to transmit by hand. Clever stuff.<\/p>\n<p>This \"statistically optimised\" design would be compromised if all the characters were \"encapsulated\" in a framework of a fixed length of 19 pulses. This would of course be irrelevant if transmitted automatically, using a 19 dot length \"packet\", by an automated system that could transmit a dot length more than about 19 times faster than a human, if only because it would be so convenient - despite the loss of job for the transmission clerk!<\/p>\n<p>Studying systems like this, it can be seen that it has been realised that there has to be a minimum 3 dot length separation between characters to avoid confusion between the characters that end with a stream of dots, and those that start with dots. The same logical separation exists for words, with a gap of 7 dot lengths, which is the same duration as a letter D, H or M, but made of silence.<\/p>\n<p>If the minimum dot length in Morse is seen as an equivalent of a 1 or 0 in today's binary systems, it can be seen that binary is more efficient in describing the characters if each is \"encapsulated\" within a byte length, because the 26 letters of the English alphabet could be ascribed numbers 1-26 in binary, which takes only 5 binary bits to range from 1-26, which is [00001 11010] in binary. The maximum character dot length in Morse is 19 \"time pulses\" long, as seen above. One octet of binary only requires 8 bits or \"dots\", and depending on how you defined a \"byte\", then 5 bits would suffice to cater for all 26 alphabet letters A-Z.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter\" src=\"https:\/\/stevepedwards.today\/DebianAdmin\/wp-content\/uploads\/2016\/03\/031716_2146_Encapsulati6.png\" alt=\"\" width=\"666\" height=\"71\" align=\"left\" \/><\/p>\n<p>Even if the numbers 0-9 are included, this gives 36 characters, that can be described in binary with only 1 more digit, the 2^5, or 32 bit column, for 6 bit length byte characters.<\/p>\n<p>One of the earliest systems to use a 5 bit \"byte\" system was the Baudot Code which could be used for telegraphic transmission and is still an unused standard today:<\/p>\n<p><em>\"Baudot's code became known as <strong>International Telegraph Alphabet No. 1<\/strong>, and is no longer used.\"<\/em><\/p>\n<p><span style=\"color: #00ff00;\"><a style=\"color: #00ff00;\" href=\"https:\/\/en.wikipedia.org\/wiki\/Baudot_code\"><span style=\"text-decoration: underline;\">https:\/\/en.wikipedia.org\/wiki\/Baudot_code<\/span><\/a><\/span><\/p>\n<p>Baudot code developed from Bacon's Cipher:<\/p>\n<p><span style=\"color: #00ff00;\"><a style=\"color: #00ff00;\" href=\"https:\/\/en.wikipedia.org\/wiki\/Bacon's_cipher\"><span style=\"text-decoration: underline;\">https:\/\/en.wikipedia.org\/wiki\/Bacon%27s_cipher<\/span><\/a><\/span><\/p>\n<p>which can be seen as an equivalent of binary bytes, if char A represents binary 0, and char B represents binary 1. As \"u=v\"and i=j, all letters are described by 24 x 5 character \"digits\" as above, from 00000 (a) to 10111 (z):<\/p>\n<p>a AAAAA g AABBA n ABBAA t BAABA<\/p>\n<p>b AAAAB h AABBB o ABBAB u-v BAABB<\/p>\n<p>c AAABA i-j ABAAA p ABBBA w BABAA<\/p>\n<p>d AAABB k ABAAB q ABBBB x BABAB<\/p>\n<p>e AABAA l ABABA r BAAAA y BABBA<\/p>\n<p>f AABAB m ABABB s BAAAB z BABBB<\/p>\n<p>The encapsulation is in the form of 5 elements per character block, and can be translated to a present-day equivalent of a time-dependent bit stream of square wave clock pulses, where each pulse represents a possible 0 or 1 bit value:<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter\" src=\"https:\/\/stevepedwards.today\/DebianAdmin\/wp-content\/uploads\/2016\/03\/031716_2146_Encapsulati7.png\" alt=\"\" width=\"789\" height=\"150\" align=\"left\" \/><\/p>\n<p>A peak represents a B, or 1, and a trough is an A or 0.<\/p>\n<p>Each character block is then delimited and so defined by an external reference clock source, that relentlessly beats time at exact intervals between each character's only allowed existence period of 5 pulses, at an amplitude of 0 or 1 only per pulse, with a counter system of some sort marking each contiguous block of 5 time periods.<\/p>\n<p>In a similar fashion to the Morse letter and word separator, there would need to be a period and\/or pattern of pulses that represented a gap between character types, whose binary value was not equal to any of the letter or number characters. The rule set - or protocol - defining all these various parameters that may be required in a functional transmission system i.e. bits per byte, clock pulse source and pulse counter technology, pulse duration in seconds, delimiter byte value, start of message byte value or pattern, end of message byte value or pattern, error detection methods, retransmission of lost bytes, methods of synchronisation at each end, limits of technology - and overall system design for purpose.<\/p>\n<p>It is only when spelled out in those terms that you realise how much is present but taken for granted in the control system of Morse Code, when humans are doing it naturally, using our own language \"protocols\" to determine timing aspects like \"message start and end\", \"garbled message\", negotiated speed of transmission and etiquette, that you think how complicated it all is to translate for a machine to do it.<\/p>\n<p>That form of counting regularly spaced clock pulses it a \"time-dependent\" coding, and all bits are organised so they fall in step either singularly or in defined blocks - with a Master Clock of some form.<\/p>\n<p>Using a very fast electronic clock source enabled a particularly efficient method of sending many signals seemingly \"simultaneously\", called Time Division Multiplexing TDM.<\/p>\n<p>This is a method of combining multiple \"conversations\" or messages along the same media (copper wire, optical fibre, Wi-Fi etc.) by interspersing small \"chunks\" of each message in a small time space, so sharing the media and clock source \"time space\", using it to transmit seemingly instantaneously - all the separate channel's messages \"at once\" if done quickly enough, compared to a human's rate of perception.<\/p>\n<p>The graphic example below could be seen as a way of constructing and deconstructing the 5 binary digit \"bytes\" of the Baudot Code above, where each consecutive bit of each Baudot character byte is from a different message stream from 5 different sources.<\/p>\n<p><strong><a href=\"https:\/\/stevepedwards.today\/DebianAdmin\/wp-content\/uploads\/2016\/03\/400px-Telephony_multiplexer_system.gif\"><img loading=\"lazy\" decoding=\"async\" class=\"wp-image-2692 aligncenter\" src=\"https:\/\/stevepedwards.today\/DebianAdmin\/wp-content\/uploads\/2016\/03\/400px-Telephony_multiplexer_system.gif\" alt=\"400px-Telephony_multiplexer_system.gif\" width=\"748\" height=\"222\" \/><\/a><br \/>\n<\/strong>This shows that it would take 5 clock pulses to send the first bit of each of the 5 separate messages, before cycling round to send the 2<sup>nd<\/sup> bit, then the 3<sup>rd<\/sup> and so on. It would take 21 pulses for the first 5 bit byte to be re-assembled by the receiver to decipher the first Baudot letter\/number character for conversation A, and 25 pulses before all conversations had received the first character of their respective message.<\/p>\n<p>This is a particularly \"democratic\" method of sharing available hardware and technology, so all receive their messages in a more \"fair\" and timely fashion without \"E\" having to wait, last in the queue, until all the others had sent their whole messages first.<\/p>\n<p>More importantly, it means there does not have to be the cost and engineering involved in creating 5 separate links, 5 encoders, 5 decoders and 5 lots of other associated resources to be built and installed to cover the same geographic area. A MASSIVE construction cost advantage, the larger the scale and distances involved.<\/p>\n<p>Think current, state-of-the-art, multi-billion dollar, but single cable, optical subsea systems that I have had the good fortune to work on in a past life, that link continents, to appreciate the real benefits of multiplexing and so encapsulation!<\/p>\n<p><a href=\"https:\/\/virtuallynao.files.wordpress.com\/2011\/04\/2011_0208_cable_basemap.jpg\">https:\/\/virtuallynao.files.wordpress.com\/2011\/04\/2011_0208_cable_basemap.jpg<\/a><\/p>\n<p><a href=\"https:\/\/stevepedwards.today\/DebianAdmin\/wp-content\/uploads\/2016\/03\/031716_2146_Encapsulati9.jpg\" target=\"_blank\" rel=\"noopener\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter\" src=\"https:\/\/stevepedwards.today\/DebianAdmin\/wp-content\/uploads\/2016\/03\/031716_2146_Encapsulati9.jpg\" alt=\"\" width=\"836\" height=\"497\" align=\"left\" \/><\/a>Multiplexing and demultiplexing has been the cornerstone of digital telegraphy\/telephony (the Internet) since it became publicly available around the 1980s, with the first digital network, TCP\/IP precursor to the modern Internet - DARPANET - sending its first message in 1969.<\/p>\n<p><span style=\"color: #00ff00;\"><a style=\"color: #00ff00;\" href=\"https:\/\/en.wikipedia.org\/wiki\/ARPANET\"><span style=\"text-decoration: underline;\">https:\/\/en.wikipedia.org\/wiki\/ARPANET<\/span><\/a><\/span><\/p>\n<p>This network was designed around the concept of \"packet switching\", where packets of data - predefined collections of encapsulated bytes that represent a message part of some type - are transmitted separately across the telephone network, but can take different phone circuit routes as available and required, before being re-assembled in the correct order that they were sent, to recreate the original message. A main driver for this was military comms requirements should any part of a comms link be taken out in a war, then the packets could find alternate routes, and still be delivered and recombined into the original message. Smart idea!<\/p>\n<p>Initially, the bulk of the data sent over the existing analogue audio frequency telephone network was digitised telephone conversations, using the Integrated Services Digital Network ISDN protocol, described in the older CISCO CCNA course, which covered ISDN in some depth, before it became more or less obsolete and replaced by Digital Subscriber Lines of various types, but describes examples of ISDN encapsulation design:<\/p>\n<p><strong><em><span style=\"font-family: Arial; font-size: 10pt;\">There are two ISDN services: BRI and PRI. The ISDN BRI service offers two 8-bit B channels and one 2-bit D channel, often referred to as 2B+D, as shown in the figure. ISDN BRI delivers a total bandwidth of a 144-kbps line into three separate channels (8000 frames per second * (2*8-bit B channel+2 bit D channel)=8000*18 = 144kbps).BRI B channel service operates at 64 kbps (8000 frames per second* 8-bit B channel) and is meant to carry user data and voice traffic.<\/span><\/em><\/strong><\/p>\n<p><strong><em>ISDN provides great flexibility to the network designer because of its ability to use each of the B channels for separate voice and\/or data applications. For example, a long document can be downloaded from the corporate network over one ISDN 64-kbps B channel while the other B channel is being used to browse a Web page.<\/em><\/strong><\/p>\n<p><strong><em>The third channel, the D channel, is a 16-kbps (8000 frames per second * 2 bit D channel) signalling channel used to carry instructions that tell the telephone network how to handle each of the B channels. BRI D channel service operates at 16 kbps and is meant to carry control and signalling information, although it can support user data transmission under certain circumstances. The D channel signalling protocol occurs at Layers 1 through 3 of the OSI reference model.<\/em><\/strong><\/p>\n<p><strong><em>ISDN physical-layer (Layer 1) frame formats differ depending on whether the frame is outbound (from terminal to network-the TE frame format) or inbound (from network to terminal-the NT frame format). Both of the frames are 48 bits long, of which 36 bits represent data. Actually, the frames are two 24 bit frames in succession consisting of 2 8-bit B channels, a 2-bit D channel, and 6 bits of framing information (2*(2*8B+2D+6F) = 32B+4D+12F = 36BD+12F = 48BDF). Both physical-layer frame formats are shown in the figure. The bits of an ISDN physical-layer frame are used as follows:<\/em><\/strong><\/p>\n<ul>\n<li><strong><em>Framing bit - Provides synchronisation. <\/em><\/strong><\/li>\n<li><strong><em>Load balancing bit - Adjusts the average bit value. <\/em><\/strong><\/li>\n<li><strong><em>Echo of previous D channel bits-Used for contention resolution when several terminals on a passive bus contend for a channel. <\/em><\/strong><\/li>\n<li><strong><em>Activation bit - Activates devices. <\/em><\/strong><\/li>\n<li><strong><em>Spare bit - Unassigned. <\/em><\/strong><\/li>\n<li><strong><em>B1 channel bits. <\/em><\/strong><\/li>\n<li><strong><em>B2 channel bits. <\/em><\/strong><\/li>\n<li><strong><em>8 Added channel bit counts bits. <\/em><\/strong><\/li>\n<li><strong><em>D channel bits - Used for user data. <\/em><\/strong><\/li>\n<\/ul>\n<p><strong><em>Note that each of the ISDN BRI frames are sent at a rate of 8000 per second. There are 24 bits in each frame (2*8B+2D+6F = 24) for a bit rate of 8000*24 = 192Kbps. The effective rate is 8000*(2*8B+2D) = 8000*18 = 144Kbps. <\/em><\/strong><\/p>\n<p><strong><em>Multiple ISDN user devices can be physically attached to one circuit. In this configuration, collisions can result if two terminals transmit simultaneously. ISDN therefore provides features to determine link contention. These features are part of the ISDN D channel, which is described in more detail later in this chapter.\" <\/em><\/strong><\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter\" src=\"https:\/\/stevepedwards.today\/DebianAdmin\/wp-content\/uploads\/2016\/03\/031716_2146_Encapsulati10.png\" alt=\"\" width=\"1093\" height=\"938\" align=\"left\" \/>You can see now how the complexity of principles build, with both encapsulation and multiplexing combining to create an architecture of bits per second, encapsulated into 24 bit frames sent over 3 multiplexed channels, at a rate of 8000 frames per second at a clock speed of 8000 x 24 = 192kbps. <a href=\"https:\/\/en.wikipedia.org\/wiki\/Synchronous_optical_networking\">https:\/\/en.wikipedia.org\/wiki\/Synchronous_optical_networking<\/a><\/p>\n<p>The ISDN system's protocols clock speed units became the base multiples for present-day multiplexed optical fibre SONET and SDH \"transport protocol's\" data \"containers\" which have grown in size with each increase in electronic technology speed to today's Dense Wave Division Multiplexing (DWDM) optical fibre, top-level international trunk links being built up from the 2, slightly different, base fibre transmission system's rates below.<\/p>\n<p>Each system adds its own overhead for management functions when multiplexed at higher levels, so upward multiplication from ISDN's slower clock speeds multiplexing is not immediately apparent, as very many <strong><em>channels<\/em><\/strong> can now be multiplexed together according to protocol, along with \"<em>interleaved<\/em>\" management data structures, making a more complex multiplexed transmission system at very high bit rates:<\/p>\n<p><strong><em>\"ISDN PRI service offers 23 8-bit channels and 1 8-bit D channel plus 1 framing bit in North America and Japan, yielding a total bit rate of 1.544 Mbps (8000 frames per second * (23 * 8-bit B channels + 8-bit D channel + 1 bit framing) = 8000*8*24.125 = 1.544 Mbps) (the PRI D channel runs at 64 kbps). ISDN PRI in Europe, Australia, and other parts of the world provides 30 8-bit B channels plus one 8-bit D channel plus one 8-bit Framing channel, for a total interface rate of 2.048 Mbps (8000 frames per second* (30*8-bit B channels + 8-bit D channel + 8-bit Framing channel = 8000*8*32 =2.048 Mbps).\"<\/em><\/strong><\/p>\n<p>So you can see how the relatively simple concept of on\/off or 1\/0 or yes\/no logic can build into more complex yet ordered structures enabling the multiplexing, transmission, reception and \"demuxing\" of massive amounts of data that now flow at superfast bit rates around the globe in seconds, every day, ceaselessly, as there is (almost!) always an alternative path available somewhere should a physical link be unavailable.<\/p>\n<p>Below is an Optical Spectrum Analyser view of only 8 test laser carrier channels of the possible hundreds that can now be sent down a single optical fibre, each carrying data pulses at gigabits per second rates in total.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter\" src=\"https:\/\/stevepedwards.today\/DebianAdmin\/wp-content\/uploads\/2016\/03\/031716_2146_Encapsulati11.jpg\" alt=\"\" width=\"938\" height=\"705\" align=\"left\" \/><\/p>\n<p style=\"text-align: l(eft;\">Photo taken when I was working on the Greenland Connect project connecting Clarenville, Newfoundland to Nuuk, Greenland in 2008).<\/p>\n<p style=\"text-align: l(eft);\">Common timing sources between inter-continental cable stations is by atomic clock and\/or GPS signals, though in this cable installation case, the temporary test equipment is rack-mounted in the test station and on the cable ship...<\/p>\n<p style=\"text-align: l(eft);\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter wp-image-9583\" src=\"https:\/\/stevepedwards.today\/DebianAdmin\/wp-content\/uploads\/2016\/03\/Goliath_cable_layer.png\" alt=\"\" width=\"778\" height=\"529\" \/><\/p>\n<p>&nbsp;<\/p>\n<p>...not this one...lol.<\/p>\n<ul>\n<li><i>Goliath<\/i>, the first ship to lay an ocean cable in 1850. Done for the\u00a0<a title=\"Submarine Telegraph Company\" href=\"https:\/\/en.wikipedia.org\/wiki\/Submarine_Telegraph_Company\">Submarine Telegraph Company<\/a>\u00a0across the\u00a0<a title=\"English Channel\" href=\"https:\/\/en.wikipedia.org\/wiki\/English_Channel\">English Channel<\/a>.<\/li>\n<\/ul>\n<p>The word protocol has been used a lot, so what does my Linux Mint system come aware of for network-related protocols?<\/p>\n<p><span style=\"color: #0000ff;\">getent protocols | wc -l<\/span><br \/>\n<span style=\"color: #ff0000;\">55<\/span><\/p>\n<p><span style=\"color: #0000ff;\">getent protocols<\/span><\/p>\n<p><span style=\"color: #ff0000;\">ip 0 IP<\/span><br \/>\n<span style=\"color: #ff0000;\">hopopt 0 HOPOPT<\/span><br \/>\n<span style=\"color: #ff0000;\">icmp 1 ICMP<\/span><br \/>\n<span style=\"color: #ff0000;\">igmp 2 IGMP<\/span><br \/>\n<span style=\"color: #ff0000;\">ggp 3 GGP<\/span><br \/>\n<span style=\"color: #ff0000;\">ipencap 4 IP-ENCAP<\/span><br \/>\n<span style=\"color: #ff0000;\">st 5 ST<\/span><br \/>\n<span style=\"color: #ff0000;\">tcp 6 TCP<\/span><br \/>\n<span style=\"color: #ff0000;\">egp 8 EGP<\/span><br \/>\n<span style=\"color: #ff0000;\">igp 9 IGP<\/span><br \/>\n<span style=\"color: #ff0000;\">pup 12 PUP<\/span><br \/>\n<span style=\"color: #ff0000;\">udp 17 UDP<\/span><br \/>\n<span style=\"color: #ff0000;\">hmp 20 HMP<\/span><br \/>\n<span style=\"color: #ff0000;\">xns-idp 22 XNS-IDP<\/span><br \/>\n<span style=\"color: #ff0000;\">rdp 27 RDP<\/span><br \/>\n<span style=\"color: #ff0000;\">iso-tp4 29 ISO-TP4<\/span><br \/>\n<span style=\"color: #ff0000;\">dccp 33 DCCP<\/span><br \/>\n<span style=\"color: #ff0000;\">xtp 36 XTP<\/span><br \/>\n<span style=\"color: #ff0000;\">ddp 37 DDP<\/span><br \/>\n<span style=\"color: #ff0000;\">idpr-cmtp 38 IDPR-CMTP<\/span><br \/>\n<span style=\"color: #ff0000;\">ipv6 41 IPv6<\/span><br \/>\n<span style=\"color: #ff0000;\">ipv6-route 43 IPv6-Route<\/span><br \/>\n<span style=\"color: #ff0000;\">ipv6-frag 44 IPv6-Frag<\/span><br \/>\n<span style=\"color: #ff0000;\">idrp 45 IDRP<\/span><br \/>\n<span style=\"color: #ff0000;\">rsvp 46 RSVP<\/span><br \/>\n<span style=\"color: #ff0000;\">gre 47 GRE<\/span><br \/>\n<span style=\"color: #ff0000;\">esp 50 IPSEC-ESP<\/span><br \/>\n<span style=\"color: #ff0000;\">ah 51 IPSEC-AH<\/span><br \/>\n<span style=\"color: #ff0000;\">skip 57 SKIP<\/span><br \/>\n<span style=\"color: #ff0000;\">ipv6-icmp 58 IPv6-ICMP<\/span><br \/>\n<span style=\"color: #ff0000;\">ipv6-nonxt 59 IPv6-NoNxt<\/span><br \/>\n<span style=\"color: #ff0000;\">ipv6-opts 60 IPv6-Opts<\/span><br \/>\n<span style=\"color: #ff0000;\">rspf 73 RSPF CPHB<\/span><br \/>\n<span style=\"color: #ff0000;\">vmtp 81 VMTP<\/span><br \/>\n<span style=\"color: #ff0000;\">eigrp 88 EIGRP<\/span><br \/>\n<span style=\"color: #ff0000;\">ospf 89 OSPFIGP<\/span><br \/>\n<span style=\"color: #ff0000;\">ax.25 93 AX.25<\/span><br \/>\n<span style=\"color: #ff0000;\">ipip 94 IPIP<\/span><br \/>\n<span style=\"color: #ff0000;\">etherip 97 ETHERIP<\/span><br \/>\n<span style=\"color: #ff0000;\">encap 98 ENCAP<\/span><br \/>\n<span style=\"color: #ff0000;\">pim 103 PIM<\/span><br \/>\n<span style=\"color: #ff0000;\">ipcomp 108 IPCOMP<\/span><br \/>\n<span style=\"color: #ff0000;\">vrrp 112 VRRP<\/span><br \/>\n<span style=\"color: #ff0000;\">l2tp 115 L2TP<\/span><br \/>\n<span style=\"color: #ff0000;\">isis 124 ISIS<\/span><br \/>\n<span style=\"color: #ff0000;\">sctp 132 SCTP<\/span><br \/>\n<span style=\"color: #ff0000;\">fc 133 FC<\/span><br \/>\n<span style=\"color: #ff0000;\">mobility-header 135 Mobility-Header<\/span><br \/>\n<span style=\"color: #ff0000;\">udplite 136 UDPLite<\/span><br \/>\n<span style=\"color: #ff0000;\">mpls-in-ip 137 MPLS-in-IP<\/span><br \/>\n<span style=\"color: #ff0000;\">manet 138<\/span><br \/>\n<span style=\"color: #ff0000;\">hip 139 HIP<\/span><br \/>\n<span style=\"color: #ff0000;\">shim6 140 Shim6<\/span><br \/>\n<span style=\"color: #ff0000;\">wesp 141 WESP<\/span><br \/>\n<span style=\"color: #ff0000;\">rohc 142 ROHC<\/span><\/p>\n<p>I recognise some from the CISCO CCNA course - IPSEC, EIGRP, L2TP, GRE, MPLS - mainly backbone router links related. Returning to the concept of text and numbers being the essential prerequisite for encoding and so sending messages, how do computers manage standards for these and other control characters today? To aid understanding, a good example you can run through pasting commands, for one main International Standard, is in William Shott's excellent Linux guide on p274 of TLCL.PDF. You see that ASCII initially used a 7 bit code - binary digits 0-127, or 2^6 (as 2^0 = 1). <em><span style=\"color: #0000ff;\">\"POSIX Character Classes<\/span><\/em><br \/>\n<em><span style=\"color: #0000ff;\">The traditional character ranges are an easily understood and effective way to handle the<\/span><\/em><br \/>\n<em><span style=\"color: #0000ff;\">problem of quickly specifying sets of characters. Unfortunately, they don,t always work.<\/span><\/em><br \/>\n<em><span style=\"color: #0000ff;\">While we have not encountered any problems with our use of grep so far, we might run<\/span><\/em><br \/>\n<em><span style=\"color: #0000ff;\">into problems using other programs.<\/span><\/em><br \/>\n<em><span style=\"color: #0000ff;\">Back in Chapter 4, we looked at how wildcards are used to perform pathname expansion.<\/span><\/em><br \/>\n<em><span style=\"color: #0000ff;\">In that discussion, we said that character ranges could be used in a manner almost identi-<\/span><\/em><br \/>\n<em><span style=\"color: #0000ff;\">cal to the way they are used in regular expressions, but here,s the problem:<\/span><\/em><\/p>\n<p><em><span style=\"color: #0000ff;\">[me@linuxbox ~]$ <strong>ls \/usr\/sbin\/[ABCDEFGHIJKLMNOPQRSTUVWXYZ]*<\/strong><\/span><\/em><\/p>\n<p><em><span style=\"color: #0000ff;\">\/usr\/sbin\/MAKEFLOPPIES<\/span><\/em><br \/>\n<em><span style=\"color: #0000ff;\">\/usr\/sbin\/NetworkManagerDispatcher<\/span><\/em><br \/>\n<em><span style=\"color: #0000ff;\">\/usr\/sbin\/NetworkManager<\/span><\/em><\/p>\n<p><em><span style=\"color: #0000ff;\">(Depending on the Linux distribution, we will get a different list of files, possibly an<\/span><\/em><br \/>\n<em><span style=\"color: #0000ff;\">empty list. This example is from Ubuntu). This command produces the expected result,<\/span><\/em><\/p>\n<p><em><span style=\"color: #0000ff;\">a list of only the files whose names begin with an uppercase letter;<\/span><\/em><\/p>\n<p><em><span style=\"color: #0000ff;\">[me@linuxbox ~]$ <strong>ls \/usr\/sbin\/[A-Z]*<\/strong><\/span><\/em><\/p>\n<p><span style=\"color: #0000ff;\"><em>\/usr\/sbin\/ModemManager<\/em><\/span><\/p>\n<p><em><span style=\"color: #0000ff;\">Back when Unix was first developed, it only knew about ASCII characters, and this fea-<\/span><\/em><br \/>\n<em><span style=\"color: #0000ff;\">ture reflects that fact. <\/span><\/em><\/p>\n<p><strong><em><span style=\"color: #0000ff;\">In ASCII, the first 32 characters (numbers 0-31) are control codes<\/span><\/em><\/strong><br \/>\n<strong><em> <span style=\"color: #0000ff;\">(things like tabs, backspaces, and carriage returns). <\/span><\/em><\/strong><\/p>\n<p><em><span style=\"color: #0000ff;\">The next 32 (32-63) contain printable<\/span><\/em><br \/>\n<em><span style=\"color: #0000ff;\">characters, including most punctuation characters and the numerals zero through nine.<\/span><\/em><\/p>\n<p><em><span style=\"color: #0000ff;\">The next 32 (numbers 64-95) contain the uppercase letters and a few more punctuation<\/span><\/em><br \/>\n<em><span style=\"color: #0000ff;\">symbols. <\/span><\/em><\/p>\n<p><em><span style=\"color: #0000ff;\">The final 31 (<strong>numbers 96-127<\/strong>) contain the lowercase letters and yet more punc-<\/span><\/em><br \/>\n<em><span style=\"color: #0000ff;\">tuation symbols. Based on this arrangement, systems using ASCII used a collation order<\/span><\/em><br \/>\n<em><span style=\"color: #0000ff;\">that looked like this:<\/span><\/em><\/p>\n<p><em><span style=\"color: #0000ff;\">ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz<\/span><\/em><\/p>\n<p><em><span style=\"color: #0000ff;\">This differs from proper dictionary order, which is like this:<\/span><\/em><\/p>\n<p><em><span style=\"color: #0000ff;\">aAbBcCdDeEfFgGhHiIjJkKlLmMnNoOpPqQrRsStTuUvVwWxXyYzZ<\/span><\/em><\/p>\n<p><em><span style=\"color: #0000ff;\">As the popularity of Unix spread beyond the United States, there grew a need to support<\/span><\/em><br \/>\n<em><span style=\"color: #0000ff;\">characters not found in U.S. English. The ASCII table was expanded to use a full eight<\/span><\/em><br \/>\n<em><span style=\"color: #0000ff;\">bits, adding characters numbers 128-255, which accommodated many more languages.<\/span><\/em><\/p>\n<p><em><span style=\"color: #0000ff;\">To support this ability, the POSIX standards introduced a concept called a locale, which<\/span><\/em><br \/>\n<em><span style=\"color: #0000ff;\">could be adjusted to select the character set needed for a particular location. We can see<\/span><\/em><br \/>\n<em><span style=\"color: #0000ff;\">the language setting of our system using this command:<\/span><\/em><\/p>\n<p><em><span style=\"color: #0000ff;\">[me@linuxbox ~]$ <strong>echo $LANG<\/strong><\/span><\/em><\/p>\n<p><em><span style=\"color: #0000ff;\">en_US.UTF-8<\/span><\/em><\/p>\n<p><em><span style=\"color: #0000ff;\">With this setting, POSIX compliant applications will use a dictionary collation order<\/span><\/em><br \/>\n<em><span style=\"color: #0000ff;\">rather than ASCII order. This explains the behavior of the commands above. A character<\/span><\/em><br \/>\n<em><span style=\"color: #0000ff;\">range of [A-Z] when interpreted in dictionary order includes all of the alphabetic char-<\/span><\/em><br \/>\n<em><span style=\"color: #0000ff;\">acters except the lowercase a, hence our results.<\/span><\/em><\/p>\n<p><em><span style=\"color: #0000ff;\">To partially work around this problem, the POSIX standard includes a number of charac-<\/span><\/em><br \/>\n<em><span style=\"color: #0000ff;\">ter classes which provide useful ranges of characters. They are described in the table be<\/span><\/em><em><span style=\"color: #0000ff;\">low:<\/span><\/em><br \/>\n<em><span style=\"color: #0000ff;\">Table 19-2: POSIX Character Classes<\/span><\/em><br \/>\n<em><span style=\"color: #0000ff;\">Character Class Description<\/span><\/em><br \/>\n<em><span style=\"color: #0000ff;\">[:alnum:] The alphanumeric characters. In ASCII, equivalent to:<\/span><\/em><br \/>\n<em><span style=\"color: #0000ff;\">[A-Za-z0-9]<\/span><\/em><br \/>\n<em><span style=\"color: #0000ff;\">[:word:] The same as [:alnum:], with the addition of the underscore<\/span><\/em><br \/>\n<em><span style=\"color: #0000ff;\">(_) character.<\/span><\/em><br \/>\n<em><span style=\"color: #0000ff;\">[:alpha:] The alphabetic characters. In ASCII, equivalent to:<\/span><\/em><br \/>\n<em><span style=\"color: #0000ff;\">[A-Za-z]<\/span><\/em><br \/>\n<em><span style=\"color: #0000ff;\">[:blank:] Includes the space and tab characters.<\/span><\/em><br \/>\n<em><span style=\"color: #0000ff;\">[:cntrl:] The ASCII control codes. Includes the ASCII characters 0<\/span><\/em><br \/>\n<em><span style=\"color: #0000ff;\">through 31 and 127.<\/span><\/em><br \/>\n<em><span style=\"color: #0000ff;\">[:digit:] The numerals zero through nine.<\/span><\/em><br \/>\n<em><span style=\"color: #0000ff;\">[:graph:] The visible characters. In ASCII, it includes characters 33<\/span><\/em><br \/>\n<em><span style=\"color: #0000ff;\">through 126.<\/span><\/em><br \/>\n<em><span style=\"color: #0000ff;\">[:lower:] The lowercase letters.<\/span><\/em><br \/>\n<em><span style=\"color: #0000ff;\">[:punct:] The punctuation characters. In ASCII, equivalent to:<\/span><\/em><br \/>\n<em><span style=\"color: #0000ff;\">[-!\"#$%&amp;'()*+,.\/:;&lt;=&gt;?@[\\]_`{|}~]<\/span><\/em><br \/>\n<em><span style=\"color: #0000ff;\">[:print:] The printable characters. All the characters in [:graph:]<\/span><\/em><br \/>\n<em><span style=\"color: #0000ff;\">plus the space character.<\/span><\/em><br \/>\n<em><span style=\"color: #0000ff;\">[:space:] The whitespace characters including space, tab, carriage<\/span><\/em><br \/>\n<em><span style=\"color: #0000ff;\">return, newline, vertical tab, and form feed. In ASCII,<\/span><\/em><br \/>\n<em><span style=\"color: #0000ff;\">equivalent to:<\/span><\/em><br \/>\n<em><span style=\"color: #0000ff;\">[ trnvf]<\/span><\/em><br \/>\n<em><span style=\"color: #0000ff;\">[:upper:] The uppercase characters.<\/span><\/em><br \/>\n<em><span style=\"color: #0000ff;\">[:xdigit:] Characters used to express hexadecimal numbers. In ASCII,<\/span><\/em><br \/>\n<em><span style=\"color: #0000ff;\">equivalent to:<\/span><\/em><br \/>\n<em><span style=\"color: #0000ff;\">[0-9A-Fa-f]<\/span><\/em><br \/>\n<em><span style=\"color: #0000ff;\">Even with the character classes, there is still no convenient way to express partial ranges,<\/span><\/em><br \/>\n<em><span style=\"color: #0000ff;\">such as [A-M].<\/span><\/em><br \/>\n<em><span style=\"color: #0000ff;\">Using character classes, we can repeat our directory listing and see an improved result:<\/span><\/em><br \/>\n<em><span style=\"color: #0000ff;\">252Bracket Expressions And Character Classes<\/span><\/em><br \/>\n<em><span style=\"color: #0000ff;\">[me@linuxbox ~]$ <strong>ls \/usr\/sbin\/[[:upper:]]*<\/strong><\/span><\/em><\/p>\n<p><em><span style=\"color: #0000ff;\">\/usr\/sbin\/MAKEFLOPPIES<\/span><\/em><br \/>\n<em><span style=\"color: #0000ff;\">\/usr\/sbin\/NetworkManagerDispatcher<\/span><\/em><br \/>\n<em><span style=\"color: #0000ff;\">\/usr\/sbin\/NetworkManager<\/span><\/em><\/p>\n<p><em><span style=\"color: #0000ff;\">Remember, however, that this is not an example of a regular expression, rather it is the<\/span><\/em><br \/>\n<em><span style=\"color: #0000ff;\">shell performing pathname expansion. We show it here because POSIX character classes<\/span><\/em><br \/>\n<em><span style=\"color: #0000ff;\">can be used for both.<\/span><\/em><\/p>\n<p><em><span style=\"color: #0000ff;\">Reverting To Traditional Collation Order<\/span><\/em><br \/>\n<em><span style=\"color: #0000ff;\">You can opt to have your system use the traditional (ASCII) collation order by<\/span><\/em><br \/>\n<em><span style=\"color: #0000ff;\">changing the value of the LANG environment variable. As we saw above, the<\/span><\/em><br \/>\n<em><span style=\"color: #0000ff;\">LANG variable contains the name of the language and character set used in your<\/span><\/em><br \/>\n<em><span style=\"color: #0000ff;\">locale. This value was originally determined when you selected an installation<\/span><\/em><br \/>\n<em><span style=\"color: #0000ff;\">language as your Linux was installed.<\/span><\/em><br \/>\n<em><span style=\"color: #0000ff;\">To see the locale settings, use the locale command:<\/span><\/em><\/p>\n<p><em><span style=\"color: #0000ff;\">[me@linuxbox ~]$ locale<\/span><\/em><\/p>\n<p><em><span style=\"color: #0000ff;\">LANG=en_US.UTF-8<\/span><\/em><br \/>\n<em><span style=\"color: #0000ff;\">LC_CTYPE=\"en_US.UTF-8\"<\/span><\/em><br \/>\n<em><span style=\"color: #0000ff;\">LC_NUMERIC=\"en_US.UTF-8\"<\/span><\/em><br \/>\n<em><span style=\"color: #0000ff;\">LC_TIME=\"en_US.UTF-8\"<\/span><\/em><br \/>\n<em><span style=\"color: #0000ff;\">LC_COLLATE=\"en_US.UTF-8\"<\/span><\/em><br \/>\n<em><span style=\"color: #0000ff;\">LC_MONETARY=\"en_US.UTF-8\"<\/span><\/em><br \/>\n<em><span style=\"color: #0000ff;\">LC_MESSAGES=\"en_US.UTF-8\"<\/span><\/em><br \/>\n<em><span style=\"color: #0000ff;\">LC_PAPER=\"en_US.UTF-8\"<\/span><\/em><br \/>\n<em><span style=\"color: #0000ff;\">LC_NAME=\"en_US.UTF-8\"<\/span><\/em><br \/>\n<em><span style=\"color: #0000ff;\">LC_ADDRESS=\"en_US.UTF-8\"<\/span><\/em><br \/>\n<em><span style=\"color: #0000ff;\">LC_TELEPHONE=\"en_US.UTF-8\"<\/span><\/em><br \/>\n<em><span style=\"color: #0000ff;\">LC_MEASUREMENT=\"en_US.UTF-8\"<\/span><\/em><br \/>\n<em><span style=\"color: #0000ff;\">LC_IDENTIFICATION=\"en_US.UTF-8\"<\/span><\/em><br \/>\n<em><span style=\"color: #0000ff;\">LC_ALL=<\/span><\/em><\/p>\n<p><em><span style=\"color: #0000ff;\">To change the locale to use the traditional Unix behaviors, set the LANG variable<\/span><\/em><br \/>\n<em><span style=\"color: #0000ff;\">to POSIX:<\/span><\/em><\/p>\n<p><em><span style=\"color: #0000ff;\">[me@linuxbox ~]$ export LANG=POSIX<\/span><\/em><\/p>\n<p><em><span style=\"color: #0000ff;\">Note that this change converts the system to use U.S. English (more specifically,<\/span><\/em><br \/>\n<em><span style=\"color: #0000ff;\">ASCII) for its character set, so be sure if this is really what you want.<\/span><\/em><br \/>\n<em><span style=\"color: #0000ff;\">You can make this change permanent by adding this line to you your .bashrc<\/span><\/em><br \/>\n<em><span style=\"color: #0000ff;\">file:\u00a0<\/span><\/em><\/p>\n<p><em><span style=\"color: #0000ff;\">export LANG=POSIX\"<\/span><\/em><\/p>\n<p>Now do you see why cutting and pasting text between systems and Apps depends on both sides using the same character maps? Each character IS a specific binary number dependent on the map used. This is NOT what gave the problems I wrote angrily about in the WordPress \"double minus sign\" Post though, even if both Linux and WordPress are set to UTF8:<\/p>\n<blockquote class=\"wp-embedded-content\" data-secret=\"SkkVnMqrWG\"><p><a href=\"https:\/\/stevepedwards.today\/DebianAdmin\/fix-double-minus-sign-problem-in-wordpress-in-theme-functions-php\/\">Fix Double Minus Sign Problem in WordPress in Theme Functions php<\/a><\/p><\/blockquote>\n<p><iframe loading=\"lazy\" class=\"wp-embedded-content\" sandbox=\"allow-scripts\" security=\"restricted\" style=\"position: absolute; visibility: hidden;\" title=\"\"Fix Double Minus Sign Problem in WordPress in Theme Functions php\" &#8212; Linux Admin, WebDev, Comms &amp; IT\" src=\"https:\/\/stevepedwards.today\/DebianAdmin\/fix-double-minus-sign-problem-in-wordpress-in-theme-functions-php\/embed\/#?secret=GvdStQF1lX#?secret=SkkVnMqrWG\" data-secret=\"SkkVnMqrWG\" width=\"600\" height=\"338\" frameborder=\"0\" marginwidth=\"0\" marginheight=\"0\" scrolling=\"no\"><\/iframe><\/p>\n<p>I assume the WordPress \"texturize\" coding \"amends\" pasted characters to a different code (at the thoughtless discretion of the WP staff) so they look \"prettier\" by trying to \"guess\" what a writer meant to put...despite that lack of foresight regarding the effect on any programme code involved...<\/p>\n<p>If you want to understand the most base essential algorithm that all computers have to to perform to manipulate digits then watch this vid on the Turing Machine:<\/p>\n<p><iframe loading=\"lazy\" title=\"Turing Machines - How Computer Science Was Created By Accident\" width=\"1778\" height=\"1000\" src=\"https:\/\/www.youtube.com\/embed\/PLVCscCY4xI?feature=oembed\" frameborder=\"0\" allow=\"accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share\" referrerpolicy=\"strict-origin-when-cross-origin\" allowfullscreen><\/iframe><\/p>\n","protected":false},"excerpt":{"rendered":"<div class=\"pvc_clear\"><\/div>\n<p id=\"pvc_stats_2668\" class=\"pvc_stats all  \" data-element-id=\"2668\" style=\"\"><i class=\"pvc-stats-icon medium\" aria-hidden=\"true\"><svg aria-hidden=\"true\" focusable=\"false\" data-prefix=\"far\" data-icon=\"chart-bar\" role=\"img\" xmlns=\"http:\/\/www.w3.org\/2000\/svg\" viewBox=\"0 0 512 512\" class=\"svg-inline--fa fa-chart-bar fa-w-16 fa-2x\"><path fill=\"currentColor\" d=\"M396.8 352h22.4c6.4 0 12.8-6.4 12.8-12.8V108.8c0-6.4-6.4-12.8-12.8-12.8h-22.4c-6.4 0-12.8 6.4-12.8 12.8v230.4c0 6.4 6.4 12.8 12.8 12.8zm-192 0h22.4c6.4 0 12.8-6.4 12.8-12.8V140.8c0-6.4-6.4-12.8-12.8-12.8h-22.4c-6.4 0-12.8 6.4-12.8 12.8v198.4c0 6.4 6.4 12.8 12.8 12.8zm96 0h22.4c6.4 0 12.8-6.4 12.8-12.8V204.8c0-6.4-6.4-12.8-12.8-12.8h-22.4c-6.4 0-12.8 6.4-12.8 12.8v134.4c0 6.4 6.4 12.8 12.8 12.8zM496 400H48V80c0-8.84-7.16-16-16-16H16C7.16 64 0 71.16 0 80v336c0 17.67 14.33 32 32 32h464c8.84 0 16-7.16 16-16v-16c0-8.84-7.16-16-16-16zm-387.2-48h22.4c6.4 0 12.8-6.4 12.8-12.8v-70.4c0-6.4-6.4-12.8-12.8-12.8h-22.4c-6.4 0-12.8 6.4-12.8 12.8v70.4c0 6.4 6.4 12.8 12.8 12.8z\" class=\"\"><\/path><\/svg><\/i> <img loading=\"lazy\" decoding=\"async\" width=\"16\" height=\"16\" alt=\"Loading\" src=\"https:\/\/stevepedwards.today\/DebianAdmin\/wp-content\/plugins\/page-views-count\/ajax-loader-2x.gif\" border=0 \/><\/p>\n<div class=\"pvc_clear\"><\/div>\n<p>Encapsulation comes in many forms and in my opinion is often overlooked and under-reported as a major concept in many IT, telecoms, computer, networking or other binary based technical courses. We don't even teach visualising \"encapsulation\" with the perfect explanatory image of a Russian Doll, yet most children are familiar with that. For me, encapsulation <a href=\"https:\/\/stevepedwards.today\/DebianAdmin\/encapsulation-from-bits-to-gigabytes-in-200-years-2\/\" class=\"more-link\">...<span class=\"screen-reader-text\">\u00a0 Encapsulation &#8211; From Bits to Gigabytes in 200 Years<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[2],"tags":[],"class_list":["post-2668","post","type-post","status-publish","format-standard","hentry","category-uncategorized"],"a3_pvc":{"activated":true,"total_views":19,"today_views":0},"_links":{"self":[{"href":"https:\/\/stevepedwards.today\/DebianAdmin\/wp-json\/wp\/v2\/posts\/2668","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/stevepedwards.today\/DebianAdmin\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/stevepedwards.today\/DebianAdmin\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/stevepedwards.today\/DebianAdmin\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/stevepedwards.today\/DebianAdmin\/wp-json\/wp\/v2\/comments?post=2668"}],"version-history":[{"count":81,"href":"https:\/\/stevepedwards.today\/DebianAdmin\/wp-json\/wp\/v2\/posts\/2668\/revisions"}],"predecessor-version":[{"id":7787,"href":"https:\/\/stevepedwards.today\/DebianAdmin\/wp-json\/wp\/v2\/posts\/2668\/revisions\/7787"}],"wp:attachment":[{"href":"https:\/\/stevepedwards.today\/DebianAdmin\/wp-json\/wp\/v2\/media?parent=2668"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/stevepedwards.today\/DebianAdmin\/wp-json\/wp\/v2\/categories?post=2668"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/stevepedwards.today\/DebianAdmin\/wp-json\/wp\/v2\/tags?post=2668"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}