Computing Based Technologies: Binary Foundation - Class Notes | CS 10001, Study notes of Computer Science

Material Type: Notes; Class: COMPUTER LITERACY; Subject: Computer Science; University: Kent State University; Term: Fall 2008;

Typology: Study notes

Pre 2010

Uploaded on 08/16/2009

koofers-user-n6b-1
koofers-user-n6b-1 🇺🇸

10 documents

1 / 3

Toggle sidebar

This page cannot be seen from the preview

Don't miss anything!

bg1
CS10001 – Understanding Computing Based Technologies: Binary Foundations
A bit is a uni t of storag e t hat c an have a val ue of ‘1’ or ‘0’. Th e process of represent ing inform ation
in bi nary req uires tha t there be en ou gh bits to un iq uely distin gu ish o ne th ing from anoth er.
For examp le our number system (base-10) al lo ws us to represent ten d ifferent quant it ies (e.g. zero
nin e) using a un iq ue symb ol (e.g. 0-9) for ea ch o f these t en di fferent qu an tities. T o re present larger
quant it ies we use a system th at al lows us to repr esent a l arger quan tity b y p la c in g one o f the base
dig its in a h ig her order position ( i.e. 10 represent th e qua nt ity 10 bec ause the higher order positio n
ind ica tes th e va lue of the base-di gi t m ulti p li ed by 10) . In th is fash ion we can represent a n infinite
number of qu an tities simp ly by a dd in g hi gh er or der p osition to this system. (i.e. 10 0 represents one
hundred, 150 0 represents one thousan d a nd five hundr ed). T hus a dding a h igher order positio n to
a base-10 nu mb er i ncre ases the max imu m v al ue th at ca n be represented by a pow er of 10. If you
are li mite d to 2 p ositions in the b ase-10 nu mb er system you ca n on ly un ique ly id entify 1 02 = 10 0
thi ngs using the i dentifiers 00- 99.
Everythin g in a c om pu ter is represented i n the base-2 number system (also ca l le d the binary
number system) T he un ique symbols in this number system are 0 & 1. An infinite nu mb er o f u ni qu e
val ues can a lso b e re presented in the base-2 nu mb er system but ea ch h ig her order position
in creases the maxi mu m val ue th at can be represented by a power o f 2 instea d o f 1 0. If yo u use
eig ht b its to en code some thing you ca n un ique ly id entify at most 28 = 256 th in gs usin g the
ide nt if iers 00000000 - 1 1111111.
A byte is a c ombin at ion o f e ig ht bi ts. Byt es store characters (regu lar or speci al) a nd di gits in u nique
co mb i nations; o ne c har ac ter at a t im e. Va lu es are en co de d using a di fferent system than th e
en co di ng used for representin g text.
Example: Represent th e digit ‘8’ in A SCII binary usin g 1 byte of stora ge.
0 0 1 1 1 0 0 0
Example: Represent th e va lue eight in base-2 binary form using 1 byt e o f storag e.
0 0 0 0 1 0 0 0
___ ___ ___ ___ ___ ___ ___ ___
27 26 25 24 23 22 21 20
Note: We use unique co mb in at io ns of our al ph abet to prod uc e words. Whe n stori ng
text ea ch by te en codes a single let ter using a byte b ased encodi ng system ca ll
ASCII (Ameri ca n Sta nd ard Code for Inf orm ation Inter ch an ge). Even a spa ce m ust
be en co de d and the ASCII binary code for a space/bl ank is 00100000. Th us the
Eng l ish word “system” co ntai ns six le tters and wou ld require six bytes of storage in a
co mp uter.
Th ere is no such conc ep t as senten ces, paragraphs, a nd pa ges for data storage in a c omputer .
Altho ug h t he data tha t is stored is ofte n text, whic h we crea te d as sente nce, p aragraphs, and p ag es,
insi de the c omp uter ea ch ch ara cter of text takes up pr ec isely 1 byte of spa ce . So, we discussing
data storage we speak of th e quant ity of byt es using th e stan dard prefix-mu lt ip liers used thro ug h-ou t
scie nce an d engineerin g (e.g. kilo, mega, g ig a, tera , p eta ,…). I n I T and d ata storage, mu lt ip liers
are def ined in p owers of 2 from 210 to 280, pro ceed in g in incremen ts of t en orders of m agni tud e (210
or 1,024, also known as a Kiloby te). Th ese multipli ers are denoted in th e f ollowing ta ble.
Th e co mput er uses the follow in g pref ixes where re ferring to stor age c ap ab il ity:
pf3

Partial preview of the text

Download Computing Based Technologies: Binary Foundation - Class Notes | CS 10001 and more Study notes Computer Science in PDF only on Docsity!

CS10001 – Understanding Computing Based Technologies: Binary Foundations

A bit is a unit of storage that can have a value of ‘1’ or ‘0’. The process of representing information in binary requires that there be enough bits to uniquely distinguish one thing from another. For example our number system (base-10) allows us to represent ten different quantities (e.g. zero – nine) using a unique symbol (e.g. 0-9) for each of these ten different quantities. To represent larger quantities we use a system that allows us to represent a larger quantity by plac ing one of the base digits in a higher order position (i.e. 10 represent the quantity 10 because the higher order position indicates the value of the base-digit multiplied by 10). In this fashion we can represent an infinite number of quantities simply by adding higher order position to this system. (i.e. 100 represents one hundred, 1500 represents one thousand and five hundred). Thus adding a higher order position to a base-10 number increases the maximum value that can be represented by a power of 10. If you are limited to 2 positions in the base-10 number system you can only uniquely identify 10^2 = 100 things using the identifiers 00-99. Everything in a computer is represented in the base-2 number system (also called the binary number system) The unique symbols in this number system are 0 & 1. An infinite number of unique values can also be represented in the base-2 number system but each higher order position increases the maximum value that can be represented by a power of 2 instead of 10. If you use eight bits to encode something you can uniquely identify at most 2^8 = 256 things using the identifiers 00000000 - 11111111. A byte is a combination of eight bits. Bytes store characters (regular or special) and digits in unique combinations; one character at a time. Values are encoded using a different system than the encoding used for representing text. Example: Represent the digit ‘8’ in ASCII binary using 1 byte of storage. 0 0 1 1 1 0 0 0 Example: Represent the value eight in base-2 binary form using 1 byte of storage. 0 0 0 0 1 0 0 0


27 26 25 24 23 22 21 20 Note: We use unique combinations of our alphabet to produce words. When storing text each byte encodes a single letter using a byte based encoding system call ASCII (American Standard Code for Information Interchange). Even a space must be encoded and the ASCII binary code for a space/blank is 00100000. Thus the English word “system” contains six letters and would require six bytes of storage in a computer. There is no such concept as sentences, paragraphs, and pages for data storage in a computer. Although the data that is stored is often text, which we created as sentence, paragraphs, and pages, inside the computer each character of text takes up precisely 1 byte of space. So, we discussing data storage we speak of the quantity of bytes using the standard prefix-multipliers used through-out science and engineering (e.g. kilo, mega, giga, tera, peta,…). In IT and data storage, multipliers are defined in powers of 2 from 2^10 to 2^80 , proceeding in increments of ten orders of magnitude (2^10 or 1,024, also known as a Kilobyte). These multipliers are denoted in the following table. The computer uses the following prefixes where referring to storage capability:

Kilobyte (KB) = 210 or 1,024 bytes or ~one thousand bytes Megabyte (MB) = 220 or 1,048,575 bytes or ~one million bytes Gigabyte (GB) = 230 or 1,073,741,824 bytes or ~one billion bytes Terabyte (GB) = 230 or 1,099,511,627,776 bytes or ~one trillion bytes Petabyte (GB) = 250 or 1,125,899,906,842,624 bytes or ~one quadrillion bytes ASCII Short for American Standard Code for Information Interexchange, ASCII is an industry standard, which assigns letters, numbers and other characters within the 256 slots available in the 8-bit code. The ASCII table is divided in 3 sections:

  • Non printable, system codes between 0 and 31.
  • Lower ASCII, between 32 and 127. This part of the table (as shown below) originates from older, American systems, which worked on 7-bit character tables. Foreign letters, like ü or è were not available then.
  • Higher ASCII, between 128 and 255. This part is programmable, in that you can exchange characters based on language you want to write in. Foreign letters are placed in this part and an example is shown after the standard ASCII character chart below. Below is the standard ASCII printable characters: Dec Char Dec Char Dec Char Dec Char Dec Char Dec Char 33! 49 1 65 A 81 Q 97 a 113 q 34 " 50 2 66 B 82 R 98 b 114 r 35 # 51 3 67 C 83 S 99 c 115 s 36 $ 52 4 68 D 84 T 100 d 116 t 37 % 53 5 69 E 85 U 101 e 117 u 38 & 54 6 70 F 86 V 102 f 118 v 39 ' 55 7 71 G 87 W 103 g 119 w 40 ( 56 8 72 H 88 X 104 h 120 x 41 ) 57 9 73 I 89 Y 105 i 121 y 42 * 58 : 74 J 90 Z 106 j 122 z 43 + 59 ; 75 K 91 [ 107 k 123 { 44 , 60 < 76 L 92 \ 108 l 124 | 45 - 61 = 77 M 93 ] 109 m 125 }
  1. 62 > 78 N 94 ^ 110 n 126 ~ 47 / 63? 79 O 95 _ 111 o 127 _ 48 0 64 @ 80 P 96 ` 112 p While the regular American Standard Code for Information Interchange (ASCII) uses seven bits of code characters (equaling 128 characters), extended ASCII uses eight bits, adding another 128 characters. The original ASCII defines the codes for the average letters and numbers used by computers. Extended ASCII defined extra characters, such as special symbols, foreign language letters, or drawing characters. Below is an example of a typical U.S. version of the extended ASCII characters.