EPAM

 Lesson1. Computer Hardware Basics

Desktop Computer Components

motherboard is a microlite printed circuit board, on which various microcircuits and expansion slots are soldered. It consists of:

  • a CPU socket into which a processor is inserted like a plug
  • DIMM Memory slots for installing RAM
  • a SATA connector for connecting a hard disk drive (HDD) and a solid state drive (SSD)
  • a northbridge, PCI slots, a CMOS battery, BIOS
  • a built-in sound card, a network card, a graphic card, USB ports

RAM stores the information about the commands that are executed, about programs, and about everything that is being worked with. It is not suitable for long-term storage, because the information disappears after a computer is turned off. Types: DIMM (dual in-line memory module), SO-DIMM (small outline DIMM), DDR SDRAM (versions 2, 3, 4).

A hard disk drive and a solid state drive ensure long-term storage of information.







We can convert number to hex or binary and count the number of bytes needed, but there is an easier way. Any positive integer  has exactly  bits when  because  is a minimum binary number requiring  bits (one and a string of  zeros) and  is a maximum binary number requiring  bits (a string of  ones). This can be stated in another way: the number of bits is the exponent of the smallest power of 2 greater than the number. Mathematically this means that we should find logarithm in base 2 of our number, round it down, and add 1.

So, we need at least 26 bits which is 4 bytes.

We can check the answer by doing conversion to hex, . Every two digits in hex is one byte. There are 7 digits, we need at least 4 bytes.





Комментарии

Популярные сообщения из этого блога

Lesson1: JDK, JVM, JRE

SE_21_Lesson_11: Inheritance, Polymorphism

SE_21_Lesson_9: Initialization Blocks, Wrapper types, String class