Linux with Operating System Concepts



Download 5,65 Mb.
Pdf ko'rish
bet244/254
Sana22.07.2022
Hajmi5,65 Mb.
#840170
1   ...   240   241   242   243   244   245   246   247   ...   254
Bog'liq
Linux-with-Operating-System-Concepts-Fox-Richard-CRC-Press-2014

Proceedings of the Linux Symposium
, pp. 604–610, 
2002.
Wrightston, K., and Merino, J., 
Introduction to Unix
, CA: Richard D. Irwin, 2003.
Wu, C., Gerlach, J., and Young, C. An Empirical Analysis of Open Source Software Developers’ 
Motivations and Continuance Intentions, 
Information and Management
, Vol. 44, pp. 253–262, 
Amsterdam: Elsevier, 2007.
Ziv, J., and Lempel, A. Compression of Individual Sequences via Variable-Rate Coding, 
IEEE 
Transactions on Information Theory
, Vol. 24, Issue 5, pp. 530–536, CA: IEEE, 1978.



631
Appendix: Binary and 
Boolean Logic
T
his appendix’s learning objectives are
• To understand the binary numbering system
• To be able to convert numbers between binary and decimal
• To understand the difference between binary, decimal, octal, and hexadecimal
• To understand storage capacities
• To be able to apply Boolean operators and the netmask
A.1 BINARY NUMBERING SYSTEM
Our computers process and store information by means of electrical current flowing 
through digital circuits. Although this detail is not something a typical Linux user needs 
to know, it does influence a number of aspects of our computer usage. Most significantly
current is in one of two states, high current or low (no) current. Our circuits store and pro-
cess information that must be representable in one of two states. For convenience, we refer 
to these states as 1 (on) and 0 (off). Thus, what a computer does is store and process binary 
information. Binary is the base 2 numbering system.
A numbering system is a means of representing numbers. There are an infinite number 
of numbering systems available to us, but most of our experience is with the decimal (base 
10) numbering system. A numbering system of base 
k
(where 
k
is some integer greater than 
0) consists of a range of digits from 0 to 
k

1 where each digit represents a power of 
k
. For 
instance, if 
k
is 10, then our digits are 0–9 and the digits in a number represent powers of 
10 (1, 10, 100, 1000, 10000, and so forth from right to left). The number 362 is really 3 in 
the “one hundred’s column,” 6 in the “ten’s column,” and 2 in the “one’s column.” For the 
most part, people only use decimal unless they are dealing with computer programming, 
computer networks, computer or electrical engineering, mathematics, or perhaps philoso-
phy of logic. In most of these cases, people may use binary, octal (base 8), or hexadecimal 


632

Appendix
(base 16). The reason for octal and hexadecimal usage is that both of these bases allow us 
to represent more readable binary values.
Using our definition for base k above, binary (base 2) will consist solely of digits 0 and 
1. We refer to a single 
b
inary dig
it
as a bit. The digits represent powers of 2. The powers of 
2 are 1, 2, 4, 8, 16, 32, 64, 128, 256, 512, 1024, and so forth. These values are computed by 
using 2
i
, where i is 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, respectively, for the values in the list. If you 
do not see the relationship between these numbers, we are multiplying each value by 2 to 
get the next one in the sequence, or we are doubling the numbers. The above list represents 
the first 11 powers of 2 starting with 2
0
and running through 2
10
. For the most part, we can 
limit our understanding of binary to the first 11 powers of 2 for an interesting reason that 
we will consider later. Table A.1 shows the first 11 powers of 2 and the equivalent binary 
value as described in this paragraph.
You might notice in the third column of Table A.1 that each successive power of 2 is 
represented by adding a 0 at the end. That is, 2 is 10 and 4 is 100, which we got by adding a 
0 after 10. We are not really “adding a 0.” Instead, we are 
shifting
the number one bit to the 
left. A left shift moves all of the digits one bit (location) to the left and the vacated spot is 
filled in with a 0. So, for instance, 10 is 2, left shifting it gives us 10_ and the gap is filled in 
with a 0. The left shift then multiplies a number by 2. Similarly, a right shift, which is shift-
ing each bit one position to the right, divides by 2. So, 10000, which is 16, becomes 1000 
when right shifted, or 8.
Using digital circuitry, we construct a “cell” to store a single bit. We need to connect 
several cells together to store a meaningful piece of information as a single 0 or 1 does not 
tell us much.
The typical size of data storage is measured in either 
bytes
or 
words
. A byte is 8 bits. 
Usually, a computer program is unable to inspect the individual bits in a byte so processes 
will look at entire bytes at a time. The byte stores a range of values from 00000000 to 
11111111. These represent the decimal numbers 0 to 255, so there are 256 total combina-
tions of 0s and 1s that can be stored in a byte (we confirm this because 2
8
=
256).
TABLE A.1 
Powers of 2

Download 5,65 Mb.

Do'stlaringiz bilan baham:
1   ...   240   241   242   243   244   245   246   247   ...   254




Ma'lumotlar bazasi mualliflik huquqi bilan himoyalangan ©hozir.org 2024
ma'muriyatiga murojaat qiling

kiriting | ro'yxatdan o'tish
    Bosh sahifa
юртда тантана
Боғда битган
Бугун юртда
Эшитганлар жилманглар
Эшитмадим деманглар
битган бодомлар
Yangiariq tumani
qitish marakazi
Raqamli texnologiyalar
ilishida muhokamadan
tasdiqqa tavsiya
tavsiya etilgan
iqtisodiyot kafedrasi
steiermarkischen landesregierung
asarlaringizni yuboring
o'zingizning asarlaringizni
Iltimos faqat
faqat o'zingizning
steierm rkischen
landesregierung fachabteilung
rkischen landesregierung
hamshira loyihasi
loyihasi mavsum
faolyatining oqibatlari
asosiy adabiyotlar
fakulteti ahborot
ahborot havfsizligi
havfsizligi kafedrasi
fanidan bo’yicha
fakulteti iqtisodiyot
boshqaruv fakulteti
chiqarishda boshqaruv
ishlab chiqarishda
iqtisodiyot fakultet
multiservis tarmoqlari
fanidan asosiy
Uzbek fanidan
mavzulari potok
asosidagi multiservis
'aliyyil a'ziym
billahil 'aliyyil
illaa billahil
quvvata illaa
falah' deganida
Kompyuter savodxonligi
bo’yicha mustaqil
'alal falah'
Hayya 'alal
'alas soloh
Hayya 'alas
mavsum boyicha


yuklab olish