Welcome, Guest: Register On Nairaland / LOGIN! / Trending / Recent / New
Stats: 3,151,894 members, 7,814,019 topics. Date: Wednesday, 01 May 2024 at 01:24 AM

Let's Peek Into A Smartphone's Brain - Phones - Nairaland

Nairaland Forum / Science/Technology / Phones / Let's Peek Into A Smartphone's Brain (28288 Views)

A Peek Into The World's First Flexible Phone - Runs Android / Chinese Market Where You Can Build A Smartphone From Scratch In A Couple Of Hour / Things To Avoid While Buying A Smartphone (2) (3) (4)

(1) (2) (3) (4) (5) (Reply) (Go Down)

Let's Peek Into A Smartphone's Brain by atheistandproud(m): 4:43pm On Jun 11, 2020
In the last post, we did a brief introduction talking data, instructions sets and just a general introduction. Now we’ll go a bit deeper. Please note that this is just to give you a general basic understanding of how these things work. Straight to the point basic knowledge.

Now let’s look at the CPU itself. Inside a CPU you’ll find
1. Control unit
2. Arithmetic and Logic unit
3. Registers (Immediate access store and cache)

These are the three main parts of a CPU inside an SoC.

Opcode and Operand: An opcode is an instruction attached to any piece of data sent to the CPU for processing. An Operand is the data that has been sent to the CPU for processing. If you click on a photo (data or operand) on your phone and click delete (opcode or instruction), both the instruction and the data are sent to your CPU for processing.

The control unit does not carry out processing. It’s function is to tell the other parts of the CPU how to do their jobs. It does this by recognising the opcode attached to an operand, matching it with the same code in the instruction set and then feeding it to the ALU which then can carries out this task.

The ALU consists of two parts, the Arithmetic unit (AU) and the Logic unit (LU). The arithmetic unit carries out arithmetic like add, subtract, divide or multiply while the logic unit carries out logical tasks like comparison, interpretation or true or false tasks. The ALU carries out its functions through the use of logic gates.

Registers and Cache: These are very fast memory circuits. You can think of each register as a box which holds a piece of data useful to the CPU. These pieces of data allow the CPU to quickly 'fetch' and then 'decode' and then 'execute' the instuctions held in RAM that are part of a program, one instruction at a time.

It is important to note that RAM is not part of the CPU, it is part of a Smartphone's SoC but not part of the CPU.

When you give an instruction to your phone, the Opcode and Operand are sent to the control unit. The app (e.g keyboard) which you are using is already kept in the RAM, also a copy of the instruction set is kept in the RAM. So when the Opcode and Operand reaches the control unit, the control unit then establishes two lines of communication with the RAM (1 for Opcode data and 2 for Operand address). The CPU does not have any proper storage of its own so it has to keep data in the RAM. This first stage is the fetch stage.
When the CPU has sent data to the RAM, it begins the decode and execute phase. Taking in bits of the operand to be worked on and matching it with the Opcode, when it’s matched. If the task to be done has the Opcode appearing multiple times, the control unit will save that piece of data to it's internal cache which is usually very small so that it doesn't have to go to the RAM till that particular set of tasks is done. The control unit feeds the data with the instructions to the ALU where the processing is done. The ALU is a maze of transistors arranged in patterns called logic gates. When data passes through them, they are processed and the results are given out as an output.

In the old days, each processor only had one CPU which did all the load, but now you can have more than one CPU sharing the load. Thus making processing of data easier and faster. Each CPU is called a core. When you have 2 CPU (dual core), 4 CPU (quad core), 6 CPU (Hexa core), 8 CPU (Octacore) and 10 CPU (Deca core).

The time taken to carry out the fetch-decode-execute cycle is called a clock cycle and it is measured per second. The unit of measurement is in Hertz. These days, CPUs run at gigahertz per second.

We'll still look at logic gates and try to determine if clock speed is what makes a CPU great as some people here have argued.

46 Likes 15 Shares

Re: Let's Peek Into A Smartphone's Brain by atheistandproud(m): 4:54pm On Jun 11, 2020
Some photos to illustrate

1. Data and address buses between CPU and RAM on a motherboard (the green lines)

2. Decode phase

3. Opcode and Operand

Link to the first post in the series can be found here https://www.nairaland.com/5901141/introduction-cpu-basics-crash-course

21 Likes 5 Shares

Re: Let's Peek Into A Smartphone's Brain by Denovan: 5:03pm On Jun 11, 2020
op well-done

14 Likes 1 Share

Re: Let's Peek Into A Smartphone's Brain by sunshineV(f): 7:08pm On Jun 11, 2020
Kudos Op

6 Likes

Re: Let's Peek Into A Smartphone's Brain by skywalker240(m): 10:45pm On Jun 11, 2020
Welcome back

4 Likes

Re: Let's Peek Into A Smartphone's Brain by atheistandproud(m): 10:46pm On Jun 11, 2020
skywalker240:
Welcome back

Thanks

6 Likes 1 Share

Re: Let's Peek Into A Smartphone's Brain by reigncalif1: 8:55am On Jun 12, 2020
very educating
Re: Let's Peek Into A Smartphone's Brain by reigncalif1: 9:23am On Jun 12, 2020
so op I qv got a question
I want to know or the difference between cpu cores and clock speed,,,,for instance can a 2.0 dual core cpu perform better than 1.3ghz octa core cpu taking that the both cpu are of the same hardware ,eg two Helio p22 chips.

secondary, this days I came to understand that octacore are not really octacore rather they were intergrated to be dual octacore ,,,8 core divided into two ,so what is the brain behind this and why .

then can a dual octacore perform better than a complete octacore which perform it's task simultaneously ... for instance can a dual octacore of snapdragon 436 perform better than a complete Helio p35 that works with all its core simultaneously.

thanks i wait a reply

5 Likes

Re: Let's Peek Into A Smartphone's Brain by moscojoor(m): 9:30am On Jun 12, 2020
Front page material

1 Like

Re: Let's Peek Into A Smartphone's Brain by atheistandproud(m): 10:21am On Jun 12, 2020
reigncalif1:
so op I qv got a question
I want to know or the difference between cpu cores and clock speed,,,,for instance can a 2.0 dual core cpu perform better than 1.3ghz octa core cpu taking that the both cpu are of the same hardware ,eg two Helio p22 chips.

secondly, this days I came to understand that octacore are not really octacore rather they were intergrated to be dual octacore ,,,8 core divided into two ,so what is the brain behind this and why .

then can a dual octacore perform better than a complete octacore which perform it's task simultaneously ... for instance can a dual octacore of snapdragon 436 perform better than a complete Helio p35 that works with all its core simultaneously.

thanks i wait a reply


I wanted to write on CPU performance further down sha. I'm still doing the research but I believe I know well enough to answer your questions sir.

1. CPU cores are the numbers of CPUs inside an SoC, while Clock speed is the time taken for the CPU to process data (fetch-decode-execute).

Clock speed speed only refers to how fast that particular CPU in question can complete tasks suited to it's ability. For example, think of the cores like roads with lanes that carry traffic.

Two cars will pass through a single lane (2 sides or two cores) road easily and quickly (easy tasks) in opposite directions right. What happened when two hundred cars for example want to pass that single lane road at once?

There will be hold up (the phone will lag and freeze).

This is because those cars can only pass at their relative speeds of twos.

But on an 8 lane highway, those two cars will pass very quickly without stress and those two hundred cars will pass through quicker and easier than the way they'll pass through a single lane road even if they drive slower (clockspeed) than those on the two land road.

So to answer your question, if Mediatek processors of the same architecture but different core numbers and clock speeds were to be compared, the processor with more CPU cores (the Octacore) will perform better than the dual core. The dual core even with its 2.0GHz can only perform limited tasks quickly whilst that Octacore can perform more tasks at a slower pace.

You can also think of it like using a knife to cut carrots with speed (dual core) or using a grater (Octacore) at any speed you like. Which one will do the work faster and better?

2. Octa core is Octa core. What happened was that in order to save battery and conserve resources. A technology pioneered by Mediatek and designed by ARM was used called the big.LITTLE.

This means that the 8 cores are divided into 2 groups. 1 group (4 cores) are used for heavy duty tasks like gaming or video calls. These cores tends to heat up the phone and consume a lot of battery as they're supposed to be powerful. This means that you cannot use them all the time. Instead you use the 2nd group (efficiency cores) which is made up weaker CPUs that do not consume power or heat up for regular tasks like chatting, SMS, calls, social media etc.
When you're using one group of cores, the other group is shut off, when you switch to another task, them the other is engaged while the first one is shut off. This is done to reduce heating and save battery.

Finally, there's no complete Octacore. So far I don't believe that there are any. All SoC manufacturers implement the big little technology. Although when the tasks are too heavy for the big core or during multitasking, all CPU cores may be engaged for a brief period.

Would a SD439 best a Helio P35, yes. I strongly believe so.

45 Likes 3 Shares

Re: Let's Peek Into A Smartphone's Brain by YxCEc2kUDRp2RWy: 10:39am On Jun 12, 2020
atheistandproud:


I wanted to write on CPU performance further down sha. I'm still doing the research but I believe I know well enough to answer your questions sir.

1. CPU cores are the numbers of CPUs inside an SoC, while Clock speed is the time taken for the CPU to process data (fetch-decode-execute).

Clock speed speed only refers to how fast that particular CPU in question can complete tasks suited to it's ability. For example, think of the cores like roads with lanes that carry traffic.

Two cars will pass through a single lane (2 sides or two cores) road easily and quickly (easy tasks) in opposite directions right. What happened when two hundred cars for example want to pass that single lane road at once?

There will be hold up (the phone will lag and freeze).

This is because those cars can only pass at their relative speeds of twos.

But on an 8 lane highway, those two cars will pass very quickly without stress and those two hundred cars will pass through quicker and easier than the way they'll pass through a single lane road even if they drive slower (clockspeed) than those on the two land road.

So to answer your question, if Mediatek processors of the same architecture but different core numbers and clock speeds were to be compared, the processor with more CPU cores (the Octacore) will perform better than the dual core. The dual core even with its 2.0GHz can only perform limited tasks quickly whilst that Octacore can perform more tasks at a slower pace.

You can also think of it like using a knife to cut carrots with speed (dual core) or using a grater (Octacore) at any speed you like. Which one will do the work faster and better?

2. Octa core is Octa core. What happened was that in order to save battery and conserve resources. A technology pioneered by Mediatek and designed by ARM was used called the big.LITTLE.

This means that the 8 cores are divided into 2 groups. 1 group (4 cores) are used for heavy duty tasks like gaming or video calls. These cores tends to heat up the phone and consume a lot of battery as they're supposed to be powerful. This means that you cannot use them all the time. Instead you use the 2nd group (efficiency cores) which is made up weaker CPUs that do not consume power or heat up for regular tasks like chatting, SMS, calls, social media etc.
When you're using one group of cores, the other group is shut off, when you switch to another task, them the other is engaged while the first one is shut off. This is done to reduce heating and save battery.

Finally, there's no complete Octacore. So far I don't believe that there are any. All SoC manufacturers implement the big little technology. Although when the tasks are too heavy for the big core or during multitasking, all CPU cores may be engaged for a brief period.

Would a SD436 best a Helio P35, yes. I strongly believe so.
Wow
How do you know so much
Re: Let's Peek Into A Smartphone's Brain by atheistandproud(m): 11:09am On Jun 12, 2020
YxCEc2kUDRp2RWy:

Wow
How do you know so much

Lol. I don't oh.

I only have a flair for being able to explain difficult concepts into simple English that everyone can understand.

21 Likes 1 Share

Re: Let's Peek Into A Smartphone's Brain by Crownedjon: 11:36am On Jun 12, 2020
Lalasticlala abeg front page
Re: Let's Peek Into A Smartphone's Brain by mummyson26(m): 12:05pm On Jun 12, 2020
.

25 Likes 1 Share

Re: Let's Peek Into A Smartphone's Brain by Darthvader93: 12:32pm On Jun 12, 2020
This one hard oh. Make I read am again sha. Slowly.

4 Likes 2 Shares

Re: Let's Peek Into A Smartphone's Brain by lalasticlala(m): 12:36pm On Jun 12, 2020
Crownedjon:
Lalasticlala abeg front page
atheistandproud kindly add link to the source or you wrote it yourself?

1 Like 6 Shares

Re: Let's Peek Into A Smartphone's Brain by atheistandproud(m): 12:44pm On Jun 12, 2020
lalasticlala:

atheistandproud kindly add link to the source or you wrote it yourself?

I wrote it myself. I don't have a blog.

56 Likes 4 Shares

Re: Let's Peek Into A Smartphone's Brain by atheistandproud(m): 12:46pm On Jun 12, 2020
LOGIC GATES

A logic gate is a building block of a digital circuit. Most logic gates have two inputs and one output and are based on Boolean algebra. At any given moment, every terminal is in one of the two binary conditions false (high) or true (low). False represents 0, and true represents 1. Depending on the type of logic gate being used and the combination of inputs, the binary output will differ. A logic gate can be thought of like a light switch, wherein one position the output is off—0, and in another, it is on—1. Logic gates are commonly used in integrated circuits (IC).


Basic logic gates
There are seven basic logic gates: AND, OR, XOR, NOT, NAND, NOR, and XNOR.

When you break a CPU down to it’s smallest units, you get logic gates. Logic gates are built with transistors. A transistor is a small semi conductor that acts like a switch in a circuit. Inside logic gates, usually an on switch is 1 and an off switch is zero. But this can be arranged in different ways to produce different results.
There are basically two types of circuits inside the CPU. The buffer circuit where turning on a switch give 1 and the inverted circuit where turning on a switch will give you a zero. These 1s and 0s are used to generate data.

Let’s look at the “and gate”. The and gate has two inputs and one output. If both inputs are on then the output is on. If one input or both inputs are off then the output is off.

At the “or gate”, if both inputs are on, then the out put is on. If both inputs are off, then the output is off. If one input is on and the other is off, the output will be on.

Moving on to the Exclusive OR gate or “XOR” gate, if both inputs are off then the output is off. If both inputs are on then the output is off. If any of the input is on, then the output is on.

For the NAND (Not AND) gate, if both inputs are off, the output is on. If both inputs are on, the output is on. If either of both inputs are on then the output is on.

For the NOR gate (Not OR), both inputs are off, the output is on. If both inputs are on, the output is off. If either of both inputs are on then the output is off.

Finally for the XNOR (Exclusive Not OR) gate, both inputs are off, the output is on. If both inputs are on, the output is on. If either of both inputs are on then the output is off.

Next we can try building a simple adding machine with these gates. Using their 1 and O in binary calculation.

8 Likes 1 Share

Re: Let's Peek Into A Smartphone's Brain by atheistandproud(m): 12:49pm On Jun 12, 2020
atheistandproud:
[space booked]

[Space booked]
Re: Let's Peek Into A Smartphone's Brain by Samyd18: 1:01pm On Jun 12, 2020
Lalasticlala

1 Like

Re: Let's Peek Into A Smartphone's Brain by Professorcplus(m): 1:25pm On Jun 12, 2020
Nice work. Only system programmers will pick interest in this. This is a major topic for system programming course.

A Practical work helps to appreciate the theoritical aspect. Computer Architecture of Simple As Possible Computer (SAP-1) using Basys3 FPGA is a popular open online project.


[img]http://4.bp..com/-jqdjDUpI3ic/UbbLPNUTmjI/AAAAAAAAAhc/P8MpkIUEqe4/s1600/img2.png[/img]

6 Likes 1 Share

Re: Let's Peek Into A Smartphone's Brain by OLDESTWARRIBOY: 1:48pm On Jun 12, 2020
OP well done I'm interested

But can't read it now, I never chop afternoon food...I go bookmark the page

1 Like

Re: Let's Peek Into A Smartphone's Brain by rawtouch: 1:49pm On Jun 12, 2020
grin
Re: Let's Peek Into A Smartphone's Brain by sammysneh(m): 1:49pm On Jun 12, 2020
Computer science & Electrical Enginering students can relate..

1 Like

Re: Let's Peek Into A Smartphone's Brain by Nobody: 1:50pm On Jun 12, 2020
Nice one
Re: Let's Peek Into A Smartphone's Brain by Balenciagaokey: 1:50pm On Jun 12, 2020
grin
Re: Let's Peek Into A Smartphone's Brain by BrandAlliances: 1:51pm On Jun 12, 2020
undecided
Re: Let's Peek Into A Smartphone's Brain by Nobody: 1:51pm On Jun 12, 2020
sunshineV:
Kudos Op

Briefly explain what u know abt all what the OP posted

1 Like

Re: Let's Peek Into A Smartphone's Brain by Slawormir: 1:52pm On Jun 12, 2020
Damnnnnn niggarrr
Isoright
Re: Let's Peek Into A Smartphone's Brain by MuchAdo: 1:52pm On Jun 12, 2020
k
Re: Let's Peek Into A Smartphone's Brain by toffyz(m): 1:52pm On Jun 12, 2020
Nice write up.

(1) (2) (3) (4) (5) (Reply)

Fix Your Phone Without Leaving Your Comfort / The Telegram Messenger Is Better Than Whatsapp / Before You Buy That Second Hand Iphone, Read This

(Go Up)

Sections: politics (1) business autos (1) jobs (1) career education (1) romance computers phones travel sports fashion health
religion celebs tv-movies music-radio literature webmasters programming techmarket

Links: (1) (2) (3) (4) (5) (6) (7) (8) (9) (10)

Nairaland - Copyright © 2005 - 2024 Oluwaseun Osewa. All rights reserved. See How To Advertise. 2
Disclaimer: Every Nairaland member is solely responsible for anything that he/she posts or uploads on Nairaland.