Friday, April 16, 2021

UNDERSTANDING THE COMPUTER REGISTERS.

 REGISTERS AND ITS USES IN COMPUTER WORLD.



REGISTERS AND ITS USES IN COMPUTER WORLD.


“IN THIS LIFE, ALL WE HAVE IS MEMORY! ” THIS EXCLAMATORY SENTENCE IS USED BY MANY FILM MAKERS IN THEIR DIALOG.  SO DOES IT ACTUALLY MEAN SOMETHING TO THEM?  YES IT DEFINITELY MEANS EVERYTHING TO THEM AND US.  THAT’S WHY THEY SHOW THEM IN THEIR CINEMA (MOVIE, FILM WHATEVER YOU SAY).


 MEMORIES MEAN EVERYTHING THAT IS STORED IN OUR BRAIN AFTER WE EXPERIENCE IT AND THEN USE IT AS A LESSON FOR LIFE  OR ENTERTAINMENT PURPOSE. HUMANS AS WELL AS ALL LIVING BEINGS DO THAT.  BUT OUR TOPIC IS  “WHAT ARE REGISTERS? WHY DO COMPUTERS NEED THEM?”

SO HERE WE BEGIN.


THE DISCRETE ELEMENTS OF INFORMATION IN A DIGITAL COMPUTER MUST HAVE A PHYSICAL EXISTENCE IN SOME INFORMATION STORAGE MEDIUM.  FURTHERMORE, WHEN DISCRETE ELEMENTS  OF INFORMATION ARE REPRESENTED IN BINARY FORM, THE INFORMATION STORAGE MEDIUM MUST CONTAIN BINARY STORAGE ELEMENTS FOR STORING INDIVIDUAL BITS.


  A BINARY CELL IS A DEVICE THAT POSSESSES TWO STABLE STATES AND IS CAPABLE OF STORING ONE BIT OF INFORMATION.  THE INPUT TO THE CELL RECEIVES EXCITATION SIGNALS THAT SET IT TO ONE OF THE TWO STATES.   THE INFORMATION STORED IN A CELL IS 1 WHEN IT IS IN 1 STABLE STATE AND A 0 WHEN IN OTHER STABLE STATE.  EXAMPLES OF BINARY CELLS ARE ELECTRONIC FLIP-FLOP CIRCUITS, FERRITE CORES USED IN MEMORY AND POSITION PUNCHED WITH A HOLE OR NOT PUNCHED IN A CARD.


A REGISTER IS A GROUP O BINARY CELLS.  SINCE A CELL STORES ONE BIT OF INFORMATION, IT FOLLOWS THAT A REGISTER WITH N CELLS CAN STORE ANY DISCRETE QUANTITY OF INFORMATION THAT CONTAINS N BITS. 


THE STATE OF A REGISTER IS AN N-TUPLE NUMBER OF 1’S AND 0’S WITH EACH BIT DESIGNATING THE STATE OF ONE CELL IN THE REGISTER.  THE CONTENT OF A REGISTER IS A FUNCTION OF THE INTERPRETATION GIVEN TO THE INFORMATION STORED IN IT. 


A REGISTER WITH N CELLS CAN BE ONE OF 2N POSSIBLE STATES.  NOW IF ONE ASSUMES THAT THE CONTENT OF THE REGISTER REPRESENTS A BINARY INTEGER,  THEN OBVIOUSLY THE REGISTER CAN STORE ANY BINARY NUMBER 0 TO 2N-1 .


LET US TAKE AN EXAMPLE 1100001111001001 THIS NUMBER IS BINARY EQUIVALENT OF 50121 IN DECIMAL NUMBER IF THE RULE IS ABOUT TAKING BINARY CODED DECIMAL FORM.  IF THE DESIGNER IS TAKING 8BIT REGISTERS.  NOW IF THE CELL IS TAKING 7 BITS IT COULD DENOTE SOMETHING ELSE.


IN EXCESS-3 CODE THE ABOVE DECIMAL NUMBER IS 9096.  IN THE EBCDIC OR IT IS TERMED AS EXTENDED BINARY CODE DECIMAL INTERCHANGE CODE THE ABOVE NUMBER IS C (LEFT EIGHT BITS) AND I (RIGHT EIGHT BITS).


FROM THIS EXAMPLE, IT ITS CLEAR THAT A REGISTER CAN STORE ONE OR MORE DISCRETE ELEMENTS OF INFORMATION AND THAT THE SAME BIT CONFIGURATION MAY BE INTERPRETED DIFFERENTLY FOR DIFFERENT TYPES OF ELEMENTS OF INFORMATION. 


IT IS IMPORTANT THAT THE USER STORE MEANINGFUL INFORMATION IN REGISTERS AND THAT THE COMPUTER BE PROGRAMMED TO PROCESS THIS INFORMATION ACCORDING TO THE TYPE OF INFORMATION  STORED.


 

A DIGITAL COMPUTER IS CHARACTERIZED BY ITS REGISTERS.  THE MEMORY UNIT IS MERELY A COLLECTION OF THOUSANDS OF REGISTERS FOR STORING DIGITAL INFORMATION.  THE PROCESSOR UNIT IS COMPOSED OF VARIOUS REGISTERS THAT STORE OPERANDS UPON WHICH OPERATIONS ARE PERFORMED.  THE CONTROL UNIT USES REGISTERS TO KEEP TRACK O VARIOUS COMPUTER SEQUENCES, AND EVERY INPUT OR OUTPUT DEVICE MUST HAVE AT LEAST ONE REGISTER TO STORE INFORMATION TRANSFERRED TO OR FROM THE DEVICE.

 

AN INTER-REGISTER TRANSFER OPERATION, A BASIC OPERATION IN DIGITAL SYSTEMS, CONSIST OF  TRANSFER OF THE INFORMATION STORED IN ONE REGISTER INTO ANOTHER.  THEN THIS INFORMATION IS BASED ON ALPHANUMERIC CODE WHICH IS DECIDED BY THE HARDWARE DESIGNER.  HERE IN ALPHANUMERIC CODE,  THE LETTER WHICH IS TYPED BY THE USER IS CONVERTED INTO 8 BIT CODE WHICH IS IN THE FORM OF 1 AND 0 SIDE BY SIDE.  


THE CHARACTER WHICH IS TYPED BY THE USER GOES TO  INPUT REGISTER, IN THE FORM OF 10010100(THIS IS AN EXAMPLE IT MAY OR MAY NOT BE THE SAME ) AS THE RULE DECIDED BY THE HARDWARE DEVELOPERS.  THEN ON ANOTHER SECOND, THE TYPED AND CONVERTED  CODE IS PUT IN THE PROCESSOR REGISTERS WHERE THE PROCESSING TAKES PLACE.  HERE PROCESSOR CONSIST OF REGISTERS WHICH IS INTERNAL TO IT.  THE EIGHT BIT CODE IS AGAIN TRANSFERRED FROM INTERNAL REGISTER OF PROCESSOR TO OUTPUT REGISTERS OF THE OUTPUT DEVICE.  
















Thursday, April 15, 2021

HOW DO COMPUTERS UNDERSTAND BINARY LOGIC

 

HOW DO COMPUTER UNDERSTAND THE BINARY LOGIC?



 

As we have shown in the previous post LANGUAGE THAT COMPUTER AS WELL AS HUMAN UNDERSTAND I am going to dig deep of that topic in this post.  I will try to explain how computer understand the binary logic.  So lets begin.  I am going to write about binary logic, that most of the computer manufacturers and developers use.

                

Binary logic deals with variables that take on two discrete values and with operations that assume logical meaning.  The two values the variables take may be called by different names (e.g. true and false, yes and no, etc.), but for our purpose it is convenient to think in terms of bits and assign the values of 1 and 0. 

 

Binary logic is used to describe, in a mathematical way, the manipulation and processing of binary information.  It is particularly suited for the analysis and design of digital systems.  For example, the digital logical circuits of many circuits that perform binary arithmetic are circuits whose behavior is most conveniently expressed by means of binary variables and logical operations.  The binary logic to be introduced in this section is equivalent to an algebra called Boolean algebra.

 

Binary logic consists of binary variables and logical operations.  The variables are designated by letters of the alphabet such as A, B, C, x, y, z, etc., with each variable having two and only two distinct  values : 0 and 1.  There are basic logic operations: AND, OR and NOT.

 

·        AND: This operation is represented by a dot or by the absence of an operator.  For example, x.y = z or xy=z is read “x AND y is equal to z”.  The logical operation  AND interpreted  to mean and z = 1 if and only if x = 1 and y = 1 otherwise z = 0. (Remember that x, y and z are binary variables and can be equal to either 1 or 0 nothing else).

·        OR : This operation is shown by addition symbol.  For example,  x + y = z is read “ x OR  y is equal to z”      meaning that z = 1 if x=1 or y=1 or both x=1 or if both x=1 and y = 1.  If both x = 0 , then y = 0 then z = 0.

·        NOT : This operation is presented by  a prime (sometimes by a bar).  For example , x’ = z (or x not equal to z meaning that x is what z is not) .  In other words, if x = 1, and z = 0 .  But if x=0 then z = 1.

 

Binary logic resembles binary arithmetic and the operations “AND” and “OR” have some similarities to multiplication and additions, respectively.  In fact, the symbols used for AND and OR are the same as those used for multiplication and addition.  However, binary logic should not be confused with binary arithmetic.  One should realize that an arithmetic variable designates a number that may consist of many digits.  A logic variable is either a one or zero.  For example, in binary arithmetic we have 1 + 1 = 1 (read “one plus one equal to 2” while in binary logic we have 1 + 1 = 1 (read “ one or one equal to one”

 

For each combination of the values of x and y there is a value of z specified by the definition of the logical operation.  These definations may be listed in compact form using truth tables.  A truth table is a table of all possible combination of the variables showing the relations between the balues that the variables may take and the result of the operation.  For example, the truth tables for he operations AND and OR with variables x and y are obtained by listing all possible values that the variable may have when combined in pairs.  The result of the operation for each combination is when listed in a separate row.  The truth tables for “AND” , “OR” and “NOT” are as under.

 

                                    AND                        

X

y

x.y

0

0

0

0

1

0

1

0

0

1

1

1

 

                                     OR

 

X

y

x +  y

0

0

0

0

1

1

1

0

1

1

1

1

 

 

                                  

 

                      NOT

X

x’

0

1

0

1

1

0

1

0

 

Thursday, April 8, 2021

RULES OF LOGIC ---> INTERNET PROTOCOL

 RULES OF LOGIC---->INTERNET PROTOCOL



FRIENDS, TODAY I AM GOING TO DISCUSS SOMETHING ABOUT IP ADDRESSING.  IP IS A LOGICAL ADDRESS FULLFORM INTERNET PROTOCOL.  IT PROVIDES LOGICAL ADDRESS TO NETWORKING DEVICES.  

THESE ADDRESSES ARE USED TO DEFINE SOURCE AND DESTINATION OF DATA PACKETS


IP HAS TWO VERSIONS

1. IP VERSION 4

2. IP VERSION 6


IP VERSION 4


IT IS 32 BIT ADDRESS WRITTEN IN DECIMAL NUMBER  FORMAT  192.168.1.1

THE NUMBERS IN THE DIGITS LIKE 192.68.1.1 HERE EVERY NUMBER BEFORE THE DOT IS AN OCTET. HERE IT IS SHOWN THAT EACH DIGIT IS PRECEDED BY DOT IS AN NUMBER BELONGING TO AN OCTET LIKE FIRST OCTET, SECOND OCTET , THIRD OCTET AND FOURTH OCTET.


EACH OCTET IS AN NUMBER IN BINARY FORM WRITTEN IN 2^8=256 BINARY FORM HERE THE DIGIT SHOWS THAT A VARIABLE IS IN THE BY POWER OF 2, HERE I WANT TO SAY THAT AS COMPUTER UNDERSTANDS BINARY DIGIT IN WHICH THE VARIABLES ARE 0 AND 1.  AS THE COMPUTER UNDERSTANDS BINARY DIGIT SO IT HAS ONLY 2 VALUES.


HENCE THE POWER IS WRITTEN IN 2. SO THE TOTAL NUMBER IN AN OCTET IS 256, HENCE THE VARIABLE IS IN (0-255) VALUES. AS OCTET HAS FOUR DIVISION SO THE VALUES AS THE NUMBER OF DIGITS IS 2^32.


 HERE I WANT TO ADD THAT THE VALUES IN AN OCTET IS 256 AS IT HAS 8 DIGITS IN A NUMBER AND THERE ARE FOUR OCTETS SO IT IS 2^32 = 429,49,67,296 VALUES OF DIFFERENT IP DIGITS.


NOW LETS GET BACK TO WORK


IP VERSION 4 ADDRESSES  ARE CLASSIFIED IN 5 CLASSES

CLASS A  0.0.0.0 ------127.255.255.255

0.0.0.0 IS RESERVED.  IT IS NOT USED IN FIRST OCTET.

127.0.0.0 – 127.255.255.255 

IS RESERVED FOR AS LOOPBACK ADDRESS.  IT IS USED TO TEST FOR WORKING OF THE LAN CARD.

  SO ACTUAL RANGE OF THE FIRST OCTET IS AS UNDER.

1.0.0.0 -----126.255.255.255



CLASS B  128.0.0.0 191.255.255.255

CLASS C  192.0.0.0 223.255.255.255

CLASS D  224.0.0.0 239.255.255.255

CLASS E  240.0.0.0 255.255.255.255 


CLASS A

CLASS B                  UNICAST + BROADCAST.  CONFIGURE IN PC

CLASS C


CLASS D           MULTICAST


CLASS E             RESERVED FOR SCIENTIFIC PURPOSE.

INTERNET PROTOCOL VERSION 4  IS OFF TWO TYPES

A) PRIVATE IP ADDRESS

B) PUBLIC   IP ADDRESS


A) PRIVATE IP ADDRESS


THIS ADDRESSES ARE USED LIN PRIVATE NETWORK, SUCH AS LAN.  WE CANNOT ACCESS INTERNET WITH THIS IP ADDRESSES.  WE DO NOT NEED TO PAY TO ANY ONE TO USE THIS ADDRESSES

CLASS A  10.0.0.0 10.255.255.255

CLASS B  172.16.0.0 172.31.255.255

CLASS C  192.168.0.0 192.168.255.255


B) PUBLIC IP ADDRESS


THIS ADDRESES ARE USED IN PUBLIC NETWORK SUCH AS WAN AND INTERNET.  WE NEED TO PAY TO SERVICE PROVIDER TO USE THIS IP ADDRESS


HOW TO CONFIGURE VIRTUAL MEMORY IN WINDOWS OPERATING SYSTEM?

  HOW TO CONFIGURE VIRTUAL MEMORY IN WINDOWS OPERATING SYSTEM? VIRTUAL MEMORY IS A MEMORY MANAGEMENT CAPABILITY OF AN OPERAING SYSTEM THAT U...