Showing posts with label computer organization. Show all posts
Showing posts with label computer organization. Show all posts

Wednesday, January 19, 2022

A baseboard management controller (BMC

  •  For context, a BMC is a specialized controller embedded in servers. It often comes in the form of a system-on-chip (SoC), with its own CPU, memory, and storage and lots of IO. A BMC connects to sensors to read environmental conditions and to fans to control temperature. It also provides other system management functions, including remote power control, serial over LAN, and monitoring and error logging of the server host CPU and memory.


Until now, on the software side, the complete BMC software stack was closed. BMC software is usually developed by the hardware manufacturer during the hardware-development phase. Because the BMC software was closed, whatever was developed for the existing hardware could not be reused for the next generation. The long BMC software schedule directly affected new hardware development. When hardware development ended, the BMC software development stopped as well. Further bug fixes or new features had to wait for the hardware manufacturer.

 

https://engineering.fb.com/2015/03/10/open-source/introducing-openbmc-an-open-software-framework-for-next-generation-system-management/

Thursday, June 30, 2016

quantum computer


  • Quantum computing is computing using quantum-mechanical phenomena, such as superposition and entanglement

A quantum computer is a device that performs quantum computing.
Such a computer is completely different from binary digital electronic computers based on transistors and capacitors.
common digital computing requires that the data be encoded into binary digits (bits), each of which is always in one of two definite states (0 or 1),
quantum computation uses quantum bits or qubits, which can be in superpositions of states.

https://en.wikipedia.org/wiki/Quantum_computing
  • What is a quantum computer?

A quantum computer is a device able to manipulate delicate quantum states in a controlled fashion, not dissimilar from the way an ordinary computer manipulates its bits.

What does a quantum computer look like?
A quantum computer looks like nothing you have on your desk, or in your office, or in your pocket. It is housed in a large unit known as a dilution refrigerator and is supported by multiple racks of electronic pulse-generating equipment. However, you can access our quantum computer with very familiar personal computing devices, such as laptops, tablets, and smartphones.

What is a qubit?
A qubit (pronounced “cue-bit” and short for quantum bit) is the physical carrier of quantum information. It is the quantum version of a bit and its quantum state can take values of 0, 1, or both at once, which is a phenomenon known as superposition.

What is a superposition?
A superposition is a weighted sum or difference of two or more states; for example, the state of the air when two or more musical tones are sounding at once. Ordinary, or “classical,” superpositions commonly occur in macroscopic phenomena involving waves.

How is superposition different from probability?
A set of n coins, each of which might be heads or tails, can be described as a probabilistic mixture of states, but it actually is in only one of them—we just don’t know which. For this reason quantum superposition is more powerful than classical probabilism. Quantum computers capable of holding their data in superposition can solve some problems exponentially faster than any known deterministic or probabilistic classical algorithm. A more technical difference is that while probabilities must be positive (or zero), the weights in a superposition can be positive, negative, or even complex numbers.


http://www.research.ibm.com/quantum/


  • Today, real quantum computers can be accessed through the cloud, and many thousands of people have used them to learn, conduct research, and tackle new problems.

Quantum computers could one day provide breakthroughs in many disciplines, including materials and drug discovery, the optimization of complex systems, and artificial intelligence.

Quantum and Chemistry
For challenges above a certain size and complexity, we don’t have enough computational power on Earth to tackle them. To stand a chance at solving some of these complex problems, we need a new kind of computing: one whose computational power also scales exponentially as the system size grows.

What makes it ‘quantum’?
All computing systems rely on a fundamental ability to store and manipulate information. Current computers manipulate individual bits, which store information as binary 0 and 1 states.
Millions of bits work together to process and display information.
Quantum computers leverage different physical phenomena
superposition
entanglement
interference
to manipulate information.
To do this, we rely on different physical devices: quantum bits, or qubits

Superposition refers to a combination of states we would ordinarily describe independently. To make a classical analogy, if you play two musical notes at once, what you will hear is a superposition of the two notes
Entanglement is a famously counter-intuitive quantum phenomenon describing behavior we never see in the classical world. Entangled particles behave together as a system in ways that cannot be explained using classical logic
Quantum interference can be understood similarly to wave interference; when two waves are in phase, their amplitudes add, and when they are out of phase, their amplitudes cancel


In order to increase the computational power of quantum computing systems, improvements are needed along two dimensions. One is qubit count; the more qubits you have, the more states can in principle be manipulated and stored.
The second is to achieve lower error rates.
Combining these two concepts, we can create a single measure of a quantum computer’s power called quantum volume. Quantum volume measures the relationship between number and quality of qubits, circuit connectivity, and error rates of operations.

https://www.research.ibm.com/ibm-q/learn/what-is-quantum-computing/


  • Quantum Computation

Rather than store information using bits represented by 0s or 1s as conventional digital computers do, quantum computers use quantum bits, or qubits, to encode information as 0s, 1s, or both at the same time.
Capabilities
Optimization
Machine learning
Sampling / Monte Carlo
Pattern recognition and anomaly detection
Cyber security
Image analysis
Financial analysis
Software / hardware verification and validation
Bioinformatics / cancer research
https://www.dwavesys.com/quantum-computing

Monday, June 20, 2016

Difference Between CPU and MicroProcessor

  • Difference Between CPU and MicroProcessor
The technology of the microprocessor has become so advanced that it has the ability to contain not just one but up to four CPUs inside it
The GPU (Graphics Processing Unit) is also contained in a microprocessor
All CPUs are microprocessors, but not all microprocessors are CPUs.
http://www.differencebetween.net/technology/difference-between-cpu-and-microprocessor

  • The CPU is combined with memory and I/O on the same chip, creating a complete computer on a single chip. This is called a microcontroller (uC).
http://electronics.stackexchange.com/questions/44740/whats-the-difference-between-a-microprocessor-and-a-cpu

Tuesday, January 28, 2014

ASCII vs Unicode


  • ASCII
On both Windows/DOS and Unix systems, the 128 most commonly-used characters are each represented by a sequence of 7 bits known as the character’s ASCII code.
They are traditionally stored as bytes (8 bits),
i.e. the 7-bit ASCII code plus a leading zero.
http://www.itk.ilstu.edu/staff/drathke/277web/WebContent/reading/asciiprint.html

Unicode
Java uses Unicode, in which all the characters are represented by 16 bits (2 bytes).
A total of 32,768 different characters are possible in Unicode, thereby allowing it to be a truly international character set.
The first 128 Unicode characters are the same as the ASCII characters, but with an extra leading zero byte in front of them


Unicode Test:
The file is called "testing1.txt" and was created in Notepad on Win2K
The 15 indicates the file is 15 bytes long.

Now I have saved the file as a "Unicode" file.
The file is called testing2.txt.


http://www.itk.ilstu.edu/staff/drathke/277web/WebContent/reading/AsciiandUnicode.html

signed magnitude


  • 3. Represent the decimal number 107 in binary using 8-bit signed magnitude, one's complement and two's complement form.

c) Signed magnitude  01101011

    One’s complement  01101011

    Two’s complement  01101011

2. Convert the fractional decimal number 190.03125 to binary with a maximum of six places to the right of the binary point.

a) 10111110.00001

1. What are the values of X, Y and Z.

d) X=120101, Y=4266, Z=832

4. If the maximum positive number that can be represented in two's complement form is y, how many bits are used in this representation?

e) 1 + log2(y+1)

5. Given a (very) tiny computer that has a word size of 6 bits, what are the smallest negative number and the largest positive number that this computer can represent in two’s complement form?

d) Smallest Negative: (100000)2, Largest Positive: (011111)2

6. A 10-bit floating point number has 1 bit for the sign of the number, 3 bits for the exponent and 6 bits for the mantissa (which is normalized). Numbers in the exponent are in two’s complement representation. No bias is used and there are no implied bits. Show the representation for the smallest positive number this machine can representation
e) 0100100000

7. Given that the ASCII code for the character "A" is 1000001, the ASCII code for "F" would be?

c) 1000110

Here is ascii table in hex values
http://core.ecu.edu/csci/wirthj/Basen/asciiCode-t.html

char  hex    decimal binary
A      41      65      1000001
B      42      66
C      43      67
D      44      68
E      45      69
F      46      70      1000110

8. A text file that is stored by using Unicode character coding system occupies 150 Kbytes.
How much space is required for another text file that contains exactly the same characters but uses ASCII character coding system?

a) 75 Kbytes


9. Given the 8-bit binary number: 1 0 0 1 1 1 0 1

What decimal number does this represent if the computer uses signed magnitude, one's complement and two's complement form.


a) -29(signed magnitude), -98(one's complement), -99(two's complement)




http://webcache.googleusercontent.com/search?q=cache:xLGumDrB-pIJ:www.fatih.edu.tr/~emanetn/courses/spring2010/ceng252/ceng252_2009_midterm1.doc+&cd=1&hl=tr&ct=clnk&gl=tr&client=firefox-a



  • Signed magnitude representation

Humans use a signed-magnitude system: we add + or - in front of a magnitude to indicate the signed
We could do this in binary as well, by adding an extra sign bit to the front of our numbers.


    A 0 sign bit represents a positive number.
    A 1 sign bit represents a negative number.


        1101base2 = 13base10 (a 4-bit unsigned number)

0 1101base2 = +13base10 (a positive number in 5-bit signed magnitude)

1 1101base2 = -1310base10 (a negative number in 5-bit signed magnitude)



http://webcache.googleusercontent.com/search?q=cache:OC8tJ0Dj968J:https://wiki.engr.illinois.edu/download/attachments/183861726/10-Subtractions-sol.ppt%3Fversion%3D1%26modificationDate%3D1317908161000+&cd=1&hl=tr&ct=clnk&gl=tr&client=firefox-a

  • Signed Magnitude:
In signed magnitude, the left-most bit is not actually part of the number, but is just the equivalent of a +/- sign.
"0" indicates that the number is positive, "1" indicates negative.
In 8 bits, 00001100 would be 12 (break this down into (1*2^3) + (1*2^2) ).
To indicate -12, we would simply put a "1" rather than a "0" as the first bit: 10001100.

http://www.math.grin.edu/~rebelsky/Courses/152/97F/Readings/student-binary#signed

Monday, January 27, 2014

Sign-Magnitude

Sign-Magnitude Representation
There are many schemes for representing negative integers with patterns of bits
One scheme is sign-magnitude.
It uses one bit (usually the leftmost) to indicate the sign. "0" indicates a positive integer, and "1" indicates a negative integer.
The rest of the bits are used for the magnitude of the number.
So -2410 is represented as:

1001 1000

The sign "1" means negative
The magnitude is 24 (in 7-bit binary)

http://chortle.ccsu.edu/AssemblyTutorial/Chapter-08/ass08_12.html

Monday, April 15, 2013

Binary Arithmetic Operations



  • Rules of Binary Addition


0 + 0 = 0
0 + 1 = 1
1 + 0 = 1
1 + 1 = 0, and carry 1 to the next more significant bit
For example,

00011010 + 00001100 = 00100110                1  1 carries
  0  0  0  1  1  0  1  0   =   26(base 10)
+ 0  0  0  0  1  1  0  0
   =   12(base 10)
  0  0  1  0  0  1  1  0   =   38(base 10)


00010011 + 00111110 = 01010001         1  1  1  1  1 carries
  0  0  0  1  0  0  1  1   =   19(base 10)
+ 0  0  1  1  1  1  1  0
   =   62(base 10)
  0  1  0  1  0  0  0  1   =   81(base 10)
Note:  The rules of binary addition (without carries) are the same as the truths of the XOR gate.

http://academic.evergreen.edu/projects/biophysics/technotes/misc/bin_math.htm#add



  • Binary Subtraction Examples

It's almost exactly the same as decimal subtraction except that when you need to borrow, you borrow 2 instead of 10.

Here are some examples of binary subtraction. These are computed without regard to the word size, hence there can be no sense of "overflow" or "underflow". Work the columns right to left subtracting in each column. If you must subtract a one from a zero, you need to “borrow” from the left, just as in decimal subtraction.

http://sandbox.mc.edu/~bennet/cs110/pm/sub.html

two's complement

  • two's complement is the way every computer I know of chooses to represent integers. To get the two's complement negative notation of an integer, you write out the number in binary. You then invert the digits, and add one to the result.


Suppose we're working with 8 bit quantities (for simplicity's sake) and suppose we want to find how -28 would be expressed in two's complement notation. First we write out 28 in binary form.

00011100
Then we invert the digits. 0 becomes 1, 1 becomes 0.

11100011
Then we add 1.

11100100
That is how one would write -28 in 8 bit binary.



Example 2

Now suppose we want to subtract 12 from 69. Now, 69 - 12 = 69 + (-12). To get the negative of 12 we take its binary representation, invert, and add one.

0000 0000 0000 0000 0000 0000 0000 1100
Invert the digits.

1111 1111 1111 1111 1111 1111 1111 0011
And add one.

1111 1111 1111 1111 1111 1111 1111 0100
The last is the binary representation for -12. As before, we'll add the two numbers together.

1111 1111 1111 1111 1111 1111 1    1
Carry Row
  0000 0000 0000 0000 0000 0000 0100 0101
(69)
+ 1111 1111 1111 1111 1111 1111 1111 0100
(-12)
  0000 0000 0000 0000 0000 0000 0011 1001
(57)

We result in 57, which is 69-12.

Example 3

Lastly, we'll subtract 69 from 12. Similar to our operation in example 2, 12 - 69 = 12 + (- 69). The two's complement representation of 69 is the following. I assume you've had enough illustrations of inverting and adding one.

1111 1111 1111 1111 1111 1111 1011 1011
So we add this number to 12.
111  
Carry Row
  0000 0000 0000 0000 0000 0000 0000 1100
(12)
+ 1111 1111 1111 1111 1111 1111 1011 1011
(-69)
  1111 1111 1111 1111 1111 1111 1100 0111
(-57)

This results in 12 - 69 = -57, which is correct.

http://www.cs.cornell.edu/~tomf/notes/cps104/twoscomp.html





  • Arithmetic operations


Addition
Adding two's-complement numbers requires no special processing if the operands have opposite signs: the sign of the result is determined automatically. For example, adding 15 and −5:
 11111 111   (carry)
  0000 1111  (15)
+ 1111 1011  (−5)
==================
  0000 1010  (10)
This process depends upon restricting to 8 bits of precision; a carry to the (nonexistent) 9th most significant bit is ignored, resulting in the arithmetically correct result of 1010.

http://en.wikipedia.org/wiki/Two's_complement






  • Calculation of 2's Complement


To calculate the 2's complement of an integer, invert the binary equivalent of the number by changing all of the ones to zeroes and all of the zeroes to ones (also called 1's complement), and then add one.

For example,

0001 0001(binary 17)      1110 1111(two's complement -17)

NOT(0001 0001) = 1110 1110  (Invert bits)
1110 1110 + 0000 0001 = 1110 1111  (Add 1)


2's Complement Addition

Two's complement addition follows the same rules as binary addition.

For example,

5 + (-3)  =  2    0000 0101 = +5
+ 1111 1101
 = -3
  0000 0010 = +2



 2's Complement Subtraction

Two's complement subtraction is the binary addition of the minuend to the 2's complement of the subtrahend (adding a negative number is the same as subtracting a positive one).

For example,

7 - 12  =  (-5)    0000 0111 = +7
+ 1111 0100
 = -12
  1111 1011 = -5



2's Complement Multiplication
Two's complement multiplication follows the same rules as binary multiplication.


2's Complement Division
Two's complement division is repeated 2's complement subtraction. The 2's complement of the divisor is calculated, then added to the dividend. For the next subtraction cycle, the quotient replaces the dividend. This repeats until the quotient is too small for subtraction or is zero, then it becomes the remainder. The final answer is the total of subtraction cycles plus the remainder
http://academic.evergreen.edu/projects/biophysics/technotes/program/2s_comp.htm#calculate



  • two's complement notation
If you have -30, and want to represent it in 2's complement,

you take the binary representation of 30
0000 0000 0000 0000 0000 0000 0001 1110

Invert the digits.
1111 1111 1111 1111 1111 1111 1110 0001

And add one.
1111 1111 1111 1111 1111 1111 1110 0010


Suppose we're working with 8 bit quantities
suppose we want to find how -28 would be expressed in two's complement notation

First we write out 28 in binary form.
00011100

Then we invert the digits. 0 becomes 1, 1 becomes 0.
11100011

Then we add 1.
11100100

That is how one would write -28 in 8 bit binary.


Two's Complement
Begin with the number in one's complement.
Add 1 if the number is negative

12 would be represented as 00001100 and -12 as 11110100.

To verify this, let's subtract 1 from 11110100, to get 11110011. If we flip the bits, we get 00001100, or 12 in decimal.

http://www.math.grin.edu/~rebelsky/Courses/152/97F/Readings/student-binary#sign

Wednesday, March 13, 2013

performance



  • Örn: Bir compiler tasarımcısı bir makina için, iki kod serisinden birini seçecektir. Donanım üreticisi aÅŸağıdaki bilgileri vermiÅŸtir :


Bu durumda:
a) Hangi kod serisi daha çok instruction işler ?
b) Hangisi daha hızlıdır?
c) Her bir kod serisi için gerekli olan CPI nedir?

MikroiÅŸlemciler ve Mikrobilgisayarlar

http://members.comu.edu.tr/boraugurlu/courses/bm307/content/week6/hafta6.pdf




  • CS1104: Computer Organisation Part I

Tutorial #5: Performance
Answers

2. There are four classes of instructions (A, B, C and D) in a certain instruction set.
Consider two different implementations, M1 and M2, of the same instruction set.

M1 has a clock rate of 500MHz. The average number of cycles for each instruction class on M1 is as follows:

https://docs.google.com/viewer?a=v&q=cache:B5F5-radnE0J:www.comp.nus.edu.sg/~cs1104/tut/tut05ans.pdf+&hl=en&pid=bl&srcid=ADGEESjiDPIdoyTFji71goG9ZMRRYDjuTcLTbs0bvW7RSBGueKjOvxDglHwgpJSLk1pfCW9iPaEOV2B9yovoYuYdUMIP3P0ipr2A9kcsVMzVHi-6tEhAfbmpgGoDOpgtzLXUEbTLM6bO&sig=AHIEtbSCQ8B0dEGekvhBfsWwP8OYuFMeRw




  • What's Chapter 2 about?

What do we mean by the performance of a computer and why are we concerned with it?
What's the best way to compare the performance of two machines?
What are benchmarks?  How useful are they
http://inside.mines.edu/~crader/cs341/Chapter2.html



  • Compiler Variations, MIPS & Performance:

An Example
• For a machine with instruction classes:

https://docs.google.com/viewer?a=v&q=cache:LXwykXBYjBoJ:meseec.ce.rit.edu/eecc550-spring2003/550-3-17-2003.ppt+&hl=en&pid=bl&srcid=ADGEEShRFdIZLl0XQN0O9UkR84xHX0MXzKFJbSkME97bIF8r9uFgyl8nrv_0j-JRWq7WBmx6apdDnmCj1pRdkhUJ3eabqlLnQatqGgltdX_00KWHokpesMbZxxPTjSJEtGJCM8b7dC0K&sig=AHIEtbQVDGqAUA3S4ProsElRoDzR5WdjOA



  • # of Instructions Example


A compiler designer is trying to decide between two
code sequences for a particular machine. Based on
the hardware implementation, there are three different
classes of instructions: Class A, Class B, and Class
C, and they require one, two, and three cycles
(respectively).

The first code sequence has 5 instructions:
2 of A, 1 of B, and 2 of C
The second sequence has 6 instructions:
4 of A, 1 of B, and 1 of C.

Which sequence will be faster? How much?
What is the CPI for each sequence?
https://docs.google.com/viewer?a=v&q=cache:9YKby6YrxkUJ:www.es.ele.tue.nl/~heco/courses/ProcDesign/pd-4.ppt+&hl=en&pid=bl&srcid=ADGEESj_XS6S784JbrciFW-RgYTxkdQ8wpf2P20T09zfvr49KQIj98UacvRv8WJ2koWLdybu3hO2VMd2TFRqFd1j1BlyD2RC1ydI3Mzv1KtIfOj__OWIqL2bQemv_fXXyVu1NY2wD-Fh&sig=AHIEtbTiBQ7UJHkSblmvP7I9qz_MWDwdOA