# AI News, BOOK REVIEW: Difference between revisions of "Computer Logic"

- On 4. oktober 2018
- By Read More

## Difference between revisions of "Computer Logic"

Computer logic is an aspect of computer design concerning the fundamental operations and structures upon which all computer systems are built.

The decimal number system uses the alphabet {0,1,2,3,4,5,6,7,8,9}, called digits, and the basic operations add, subtract, mulitply, and divide, symbolised as {+,-,*,/}.

Thus the numbers 5, 50, 500, 0.000005 all contain the digit 5 to represent different quantities and the 0 digit merely allows us to correctly position the 5.

While this may seem crazy, the fact is this flexibility is exactly what enables computer scientists to design language aware tools, like word-processors, spell checkers, and rudimentary language translators.

Since computer science is utterly based on Number System Theory, the meaning of digits must be expanded beyond mere counting, quantities, and values.

The key to understanding computers lies in unlearning that the digit 1 means one and only one, and learning that the digit 1 identifies something, which may not be a number at all.

The astute reader (and you are, aren't you?) will have noticed that a ten-digit number system can represent nine values, four digits only three values, and twenty no more than nineteen.

For a ten digit system the change is a multiple of ten, a four digit system changes by a multiple of four, and a twenty digit system changes each position by a multiple of twenty.

The number 1104 can now be read as, 'One-one-zero, base four' and know that 'One-one-zero, base eight' (1108) might look similar to 1104, but is actually a different value in another Number System.

Base 2 (binary), Base 8 (octal), and Base 16 (hexadecimal) numeral systems are used because designing a computer system is simpler in this manner than for other bases.

The hexadecimal numeral system has the special property that every digit represents exactly four bits, so it can be used as a compact representation of large values.

For example, the binary equivalent of the hexadecimal number A3 is 10100011, where A is 1010 (10 in decimal) and 3 is 0011 (3 in decimal).

Just as rules exist for arithmetic operations on decimal numbers, there are a number of techniques for evaluating various operations in non-decimal bases.

This system is popular because numbers using this representation are easy to negate, and arithmetic operations can be performed on both positive and negative numbers in the same manner.

In two's complement, binary values whose most significant bit (MSB) is 0 are positive, whereas those whose MSB is 1 are negative.

it takes advantage of the fact that adding 1 forces you to carry that bit during the addition, so we save ourselves some work ahead of time: beginning with the least significant bit (LSB), keep all of the 0-bits and the least significant 1-bit (10 in our example);

In binary, it is slightly easier, because you will notice that after 1, we have already reached the base, so just zero the current position, and carry that 1 to the next position.

Using 4-bit binary strings, each decimal digit is encoded in binary: 48610 = (0100 1000 0110)2.

The limit is of course 10012 because 9 is the largest decimal value and the 4-bit binary string has a capacity of 1510.

The time it takes for a gate to generate an output when it receives new inputs signals is not instantaneous, but it is very fast, on the order of picoseconds.

Decoding is performed by decoder,a combonational circuit with an n-bit binary code applied to its input and an m-bit binary code appears at the output.

An encoder is a digital function that perform the inverse operation of a decoder.An encoder has 2'n input lines and n output lines.The output lines generate the binary code corresponding to the input value.

- On 23. september 2021

**Representing Numbers and Letters with Binary: Crash Course Computer Science #4**

Please take our PBS Digital Studios Survey! Today, we're going to take a look at how computers use a stream of 1s ..

**Binary Numbers and Base Systems as Fast as Possible**

Binary numbers, man... How do they work? Get a FREE 7 day trial for lynda.com here: Follow Taran on Twitter @taranvh

**Twos complement: Negative numbers in binary**

How can we represent negative numbers in binary? There are several ways. This video compares using a sign bit, ones complement, and twos complement.

**GENIUS TRICK - Convert Decimal Numbers To Binary (Base 2)**

This video gives a method to convert decimal numbers to binary numbers quickly. This is a variation of the remainder system that is typically taught in courses.

**A brief history of numerical systems - Alessandra King**

View full lesson: 1, 2, 3, 4, 5, 6, 7, 8, 9... and 0. With just these ten symbols, we ..

**Lesson 6.1 : Basics of signed and unsigned numbers**

See more at -- The basics of signed and unsigned numbers

**Binary Numbers**

Understanding how numbers are represented. Introduction to binary numbers.

**Converting larger number from decimal to binary | Pre-Algebra | Khan Academy**

Watch the next lesson: ...

**Introduction to number systems and binary | Pre-Algebra | Khan Academy**

Watch the next lesson: ...

**Converting from decimal to binary | Applying mathematical reasoning | Pre-Algebra | Khan Academy**

Watch the next lesson: ...