Binary, Hexadecimal and Decimal Conversion with Microcomputer Architecture, Lecture notes of Architecture

Instructions on converting binary to hexadecimal and hexadecimal to binary, as well as hexadecimal to decimal and decimal to hexadecimal. It also covers the basics of microcomputer architecture, including the advantages of computer systems and their main components.

Typology: Lecture notes

2021/2022

Uploaded on 09/12/2022

ellen.robinson
ellen.robinson 🇬🇧

4.8

(8)

222 documents

1 / 6

Toggle sidebar

This page cannot be seen from the preview

Don't miss anything!

bg1
pf3
pf4
pf5

Partial preview of the text

Download Binary, Hexadecimal and Decimal Conversion with Microcomputer Architecture and more Lecture notes Architecture in PDF only on Docsity!

A. Binary – to – Hexadecimal conversion: 4-bit groups, starting at the right-most bit.

Example (17) : (1100101001010111) 2 ======= (CA57) 16

1100 1010 0101 0111

C A 5 7

B. Hexadecimal – to – Binary Conversion: Example (18) : (10A4) 16 =========(1000010100100) 2

1 0 A 4 0001 0000 1010 0100

C. Hexadecimal – to – Decimal Conversion: **By two method

  • First method:** Example (19) : (A85) 16 ====(2693) 10 1- Convert to binary number. 2- Convert from binary number to decimal number. A 8 5 1010 1000 0101 = 211 *1+2^10 *0+2^9 *1+2^8 *0+2^7 *1+2^6 *0+2^5 *0+2^4 *0+2^3 *0+2^2 *1+2^1 *0+2^0 *1= 211 +2^9 +2^7 +2^2 +2^0 =2048+512+128+4+1=2693= (2693) 10

*** Second method:** Example(20) : ( E5) 16 ========(229) 10 (E5) 16 =16^1 E+16^0 * 1614+1*5 =224+5=229= (229) 10

D. Decimal – to – Hexadecimal Conversion: Convert the decimal number 650 to hexadecimal by repeated division by 16. Example(21) : (650) 10 =====(28A) 16

650 16 mod LSB 40 16 A 2 16 8 (28A) 16 0 2

MSB

Microcomputer Architecture

The word computer comes from the word (compute) the word compute means to (calculate) or to (count) , computer is an electronic device that manipulates information or (data). It has ability to store, retrieval, and process data.

Advantages of computer system: - 1- Store and retrieve large quantities of data. 2-The speed is faster than in any other form of data processing. 3-A single computer can perform a wide variety of activities as directed by a set of instructions (program). 4-Once data and instructions are fed into the computer, processing is continuous with a minimum of human intervention. 5-Data and programs may be stored inside the computer indefinite and be retrieved quickly. 6- Accuracy is greater than any other system.

A computer system has three main components : a Central Processing Unit (CPU) or processor, a Memory Unit and Input/output Units ( devices). In any microcomputer system, the component which actually processes data is entirely contained on a single chip called M icroprocessor (MPU). This MPU can be programmed using assembly language. The main internal hardware features of a computer are the processor , memory and registers (registers are special processor components for holding address and data).

The external hardware features are the computer Input/Output devices such as keyboard, monitor…

Software consists of the operating system (O.S) and various programs and data files stored on disk.

Personal Computer (PC) Components:-

Address Bus (AB): the width of AB determines the amount of physical memory addressable by the processor.

2- Data Bus (DB): the width of DB indicates the size of the data transferred between the processor and memory or I/O device.

3- Control Bus (CB): consists of a set of control signals, typical control signals includes memory read, memory write, I/O read, I/O write, interrupt acknowledge, bus request. These control signals indicates the type of action taking place on the system bus.

Figure (1) The system bus : the processor communicates with all devices via the system bus

The CPU is divided into two general parts. Arithmetic Logic Unit (ALU) and Control Unit (CU).

  • The ALU carry Arithmetic, logical, and shifting operations.
  • The CU fetches data and instruction, and decodes addresses for

the ALU.

Data Bus

Address Bus

Data Register

Address Register

CU ALU^

Memory

Figure (2): A Block Diagram of the Simple CPU

Register:- Registers are devices capable of storing information, receiving

data from other areas within the computer and transferring information as

directed by the control unit, it is used for temporary storage of data or

instruction and the most important register are :

  • Program counter (PC): hold address of the next instruction
  • Instruction register (IR): Hold instruction while it is decoded and

Executed

- Address register (AR): holds the address of memory location.

  • PSW (Processor Status Word): collection of bits called Flags or Condition

Codes. They typical used to indicate a Zero result, a Negative result, a Carry,

an Overflow and so on.

  • SP (Stack Pointer): Stack may consist of a set of internal registers or a portion

of main memory. It is used for temporarily storing important information

while subroutines are being executed. The top of the stack is the last

information put onto the stack.

The instruction is brought in from the memory and placed in the IR. The

Control Unit then decodes the instruction direct its execution. At the same

time the CU sets the PC/IP to the address of the next instruction.

B- Memory (Main Memory)

The memory of a computer system consist of tiny electronic switches,

with each switch set in one of two states: open or close.

It is however more convenient to think of these states as 0 and 1 .Thus

each switch can represent a binary digit or bit, as it is known, the memory unit

consists of millions of such bits, bits are organized into groups of eight bits

called byte. Memory can be viewed as consisting of an ordered sequence of

bytes. Each byte in this memory can be identified by its sequence number