Danh mục

Binary Converting to and from decimal

Số trang: 27      Loại file: pdf      Dung lượng: 336.98 KB      Lượt xem: 14      Lượt tải: 0    
10.10.2023

Phí tải xuống: 15,000 VND Tải xuống file đầy đủ (27 trang) 0
Xem trước 3 trang đầu tiên của tài liệu này:

Thông tin tài liệu:

We normally use the decimal (denary).system, also called base 10.l There are 10 different symbols .(digits).l 0, 1, 2, 3, 4, 5, 6, 7, 8, 9l To count higher than nine we re-use thesymbols by putting them in columns.l The value of aComputers use the binary system, also calledbase 2l There are two different symbols (digits)l 0, 1l To count higher than one we re-use thesymbols by putting them in columnsl The value of a symbol depends on itsposition symbol depends on itsposition....
Nội dung trích xuất từ tài liệu:
Binary Converting to and from decimal Binary Converting to and from decimal3-Dec-09 quangkien@gmail.com 1 1Decimall We normally use the decimal (denary) system, also called base 10l There are 10 different symbols (digits)l 0, 1, 2, 3, 4, 5, 6, 7, 8, 9l To count higher than nine we re-use the symbols by putting them in columnsl The value of a symbol depends on its position 3-Dec-09 quangkien@gmail.com 2 2Decimal positions 1000 100 10 1Thousands Hundreds Tens Units 8 2 5 3Eight thousand two hundred and fifty three 3-Dec-09 quangkien@gmail.com 3 3Binaryl Computers use the binary system, also called base 2l There are two different symbols (digits)l 0, 1l To count higher than one we re-use the symbols by putting them in columnsl The value of a symbol depends on its position 3-Dec-09 quangkien@gmail.com 4 4Binary positions 8 4 2 1 Eights Fours Twos Units 1 1 0 1One eight, one four, no twos and one unitThat makes thirteen 3-Dec-09 quangkien@gmail.com 5 5Counting in binary anddecimal 0 0 1000 8 1 1 1001 9 10 2 1010 10 11 3 1011 11 100 4 1100 12 101 5 1101 13 110 6 1110 14 111 7 1111 153-Dec-09 quangkien@gmail.com 6 6Why do computers usebinary?l Computer components that store or handle data are often two-state devicesl This is like a switch that can be on or offl A memory unit could exist in two voltage states, high or lowl A voltage on a cable could be high or lowl A light could be on or offl Two states can be coded by binary 0 and 1 3-Dec-09 quangkien@gmail.com 7 7Why am I learning aboutbinary?l In your Cisco course, you will learn about IP addresses and how to split up a network into subnetsl You need to work out subnet addresses and workstation addressesl For this you need to use binary 3-Dec-09 quangkien@gmail.com 8 8Bytes or octetsl We often handle binary digits (bits) in groups of eightl Sometimes these groups are called bytesl Sometimes they are called octetsl We shall often be calling them octetsl Examples of octets: 00101101 10110010 3-Dec-09 quangkien@gmail.com 9 9Convert binary to decimalValue 128 64 32 16 8 4 2 1BinaryConvert 11001010 binary to decimalWrite in the binary digits under their values 3-Dec-09 quangkien@gmail.com 10 10Convert binary to decimalValue 128 64 32 16 8 4 2 1Binary 1 1 0 0 1 0 1 0Convert 11001010 binary to decimalWrite in the binary digits under their valuesNext write in the value for each binary 1 digit 3-Dec-09 quangkien@gmail.com 11 11Convert binary to decimalValue 128 64 32 16 8 4 2 1Binary 1 1 0 0 1 0 1 0 128 64 8 2Convert 11001010 binary to decimalWrite in the binary digits under their valuesNext write in the value for each binary 1 digitAdd up the values 128 + 64 + 8 + 2 = 202 3-Dec-09 quangkien@gmail.com 12 12One for you to tryl Convert 10010101 from binary (base 2) to decimal (base 10)Value 128 64 32 16 8 4 2 1Binary 3-Dec-09 quangkien@gmail.com 13 13Answerl Convert 10010101 from binary (base 2) to decimal (base 10)Value 128 64 32 16 8 4 2 1Binary 1 0 0 1 0 1 0 1 128 16 4 1128 + 16 + 4 + 1 = 149 3-Dec-09 quangkien@gmail.com 14 14Convert 185 decimal to binaryValue 128 64 32 16 8 4 2 1BinaryCheckConvert 185 decimal to binaryCan you take 128 from 185? Yes.Put 1 under 128What is left? 185-128 = 57 3-Dec-09 quangkien@gmail.com 15 15Convert 185 decimal to binaryValue 128 64 32 16 8 4 2 1Binary 1CheckWe have 57 leftCan you take 64 from 57? No.Put 0 under 64What is left? Still 57 3-Dec-09 quangkien@gmail.com 16 16Convert 185 decimal to binaryValue 128 64 32 16 8 4 2 1Binary 1 0CheckWe have 57 leftCan you take 32 from 57? Yes.Put 1 under 32What is left? 57 – 32 = 25 3-Dec-09 quangkien@gmail.com 17 17Convert 185 decimal to binaryValue 128 64 32 16 8 4 2 1Binary 1 0 1CheckWe have 25 leftCan you take 16 from 25? Yes.Put 1 under 16What is left? 25 – 16 = 9 3-Dec-09 quangkien@gmail.com 18 18Convert 185 decimal to binaryValue 128 64 32 16 8 ...

Tài liệu được xem nhiều:

Gợi ý tài liệu liên quan: