Sunday 4 June 2023

Operators and Expressions in C

What are an operators and expressions?

An operator states an operation to be performed that relent a value. Several operators to form an expression can fix the constants, variables. An operand is a information item on which an operator behave. Some operators need two operands, while others behave upon only one operand. C includes a big number of operators that fall under several different categories, which are as follows

C language, operators, Expressions in C
C language operators and expressions image-1

1.       Arithmetic operators

2.       Bitwise operators

3.       Comma operator

4.       Logic operators

5.       Relational operators

6.       Sizeof operator

7.       Increment and decrement operators

8.       Assignment operators

9.       Conditional operator

10.   Other operators

 

1.1   Arithmetic operators

Arithmetic operators are used for numeric calculations. They are of two types –

1.       Unary arithmetic operators

2.       Binary arithmetic operators

 

1.2   Assignment operator

A worth can be set aside in a not consistent with the use of assignment operator. This assignment operators “=” is used in assignment statements and assignment expressions.

 

1.3   Increment and Decrement operators

C has two functional operators increment (++) and decrement (--). These are unary operators as they operate on a single operand.

1.4   Relational operators

Relational operators are functional to collate values of two expressions be controlled on their relations. An expression that carries relational operators is called relational expressions. if the relation is false then the value of expression is 0 and If the relation is true then the value of relational expression is 1.

 

1.5   Logical or Boolean operators

An expression that integrates two or more expressions is termed as a logical expression. For merge these expressions we use logical operators.

1.6   Conditional operator

Conditional operator is a ternary operator which requires three operands expressions.

This is written as – TestExpression ? Expression1 : expression 2

Here first the expression a>b is evaluated, if the worth is true then the value of variable as the value of conditional expression otherwise the value of b becomes the value of conditional expression.

1.7   Comma operator

The comma operator (,) is used to permit dissimilar expressions to look in situations where only one expression would be used. The comma operators break up the expressions. The separated expressions are assessing from left to right and the type and value of the rightmost expression is the type and value of the compound expression.

1.8   Sizeof operator

Sizeof is a unary operator. This operator gives the size of its operand it terms of bytes.

1.9   Bitwise operators

C has the capacity to support the manipulation of data at the bit level. Bitwise operators operate on integers only.


Computer stuff kit tricks of Topics 48.




Friday 2 June 2023

Input and Output in C

What is Input – Output in C?

There are three main task of any program – it takes data as input, procedure this data and gives the output. The input operation require motion of data from an (generally keyboard) input device to computer memory, while in output function the data moves from computer reminder to the (generally screen) output device. The input output is executed through a set of library operation that is give with every C compiler.

C compiler, computer memory, header files
Input and Output in C language image-1

There are some header files that supply mandatory details in support of the many library functions. These header files are set foot in the program using the #include instruction at the starting point of the program. For example if a project uses any function from, the quality I/O library, then it should involve the header file stdio.h as-

#include <stdio.h>

Likewise there are other header files like stdlib.h, string.h that should be added when certain library functions are used.

An easy method for taking the data as input is to give the usefulness to the variables by task statement. For example-

int basic = 2000;

Char ch=’y’;

But in this way we can give only specific data to the variables. The second procedure is to use the input function scanf(), which takes the input facts from the keyboard. In this procedure we can give any value to the change at run time.

Conversion specifications

The functions scanf() and printf() make use of change stating to identify the type and size of data. Each transformation specification must begin with a percent sign(%). Some altering specifications are as given below-

%d – a decimal integer, %x – a hexadecimal integer, %f – a floating point number, %c – a single character, %o – an octal integer, %s – a string and %u – an unsigned decimal integer

Reading input data

Input data can be beginning into the memory from a worth input device (key board). C provides the scanf() library purpose for beginning input data. This task can take all types of utility as input. The scanf() function can be written as – scanf(“control string”, address1, address2,so on);

This task should have at least two variables. A first variable is a authority string, which carry conversion specification characters. It should be within double restate. The conversion specification nature may be one or more; it be able to trust on the number of change we want to input. The other variable are mark of variables. In the scanf() function at least one mark should be present. The mark of a variable is found by prior the changing name by an ampersand (&) sign. A string variable is not lead up to by & signs to get the mark.


Computer stuff kit tricks of Topics 47.





Thursday 1 June 2023

8051 Assembly language

What is an assemble language code?

We look at the inside of the 8051. We reveal some of the more used registers of the 8051 with easy command (instructions) such as MOV and ADD. We inspect assembly language and machine language coding and definition terms such as opcode, mnemonics, operand, etc.  The process of collect and produce a ready to run code for the 8051.

8051 microcontroller, embedded assembly, coding
8051 Assembly language image-1

Step by step implementation of an 8051 and the part of the program counter are look into. We look at some interval between used assembly language pseudocode, directives, and data types connected to the 8051. We talk about the flag bits and how they are influenced by arithmetic command. Allotment of RAM memory core the 8051 plus the heap and roll banks of the 8051.

Registers

In the CPU, directories are used to store information for the moment. Those see to could be a byte of data to be processed, or a mark pointing to the data to be get. The huge seniority of 8051 registers are 8-bit registers.

In the 8051 there is only one data type: The eight (8) bits of a register are shown in the diagram from the MSB (most significant bit) D0. With an (eight) 8-bit data type, any data larger than (eight)8 bits must be splintered into (eight) 8-bit block before it is processed.

The accumulator, is used for all arithmetic and logic command register A. The most widely used index of the 8051 are (accumulator) A, B, R0, R1, R2, R3, R4, R5, R6, R7, (data pointer) DPTR and (program counter) PC (. To understand the use of these registers, we will show them in the conditions of two simple command, MOV and ADD.

Simply state, the MOV instruction copies data from one location to another location. It has the following format:

MOV destination, source ;copy source to destination.

This command tells the (in reality, copy) CPU to move the source operand to the landing place operand.

After this command is executed, register A will have the same value as register R0. The MOV command does not affect the source operand.


Computer stuff kit tricks of Topics 46.



Embedded processors

What is Microcontrollers and Embedded processors?

In this portion we talk about the need for microcontrollers and difference them with general-purpose microprocessors such as the Pentium and x86 microprocessors. We also look at the bit part of microcontrollers in the embedded market. In addition, we issue some basis on how to choose a microcontroller.

Microcontroller 8051, general purpose microprocessor, embedded system
Microcontroller and Embedded processor image-1

Microcontroller versus general-purpose microprocessor

What is the differentiation between a microprocessor and microcontroller?  These microprocessors contain no RAM, no ROM and no I/O ports on the fragment itself. For this reason, they are often mentioning to as general-purpose microprocessors.

Microcontroller for embedded systems

In the writing debate microprocessors, we frequently see the term embedded system. Microprocessors and microcontrollers are interval between used in embedded system fruit. An embedded outcome uses a microprocessor or microcontroller to do one duty and one duty only. A printer is a sample of embedded system for the cause that the processors inside it execute only one duty, getting the data and printing it. Difference this with a Pentium-based PC (or any x86 IBM-compatible PC). A PC can be used for any number of appeals such as word processor, video game player, bank teller terminal, print server, network server, or internet terminal.

Some Embedded products using microcontrollers such as Home Appliances, intercom, telephones, security systems, camcorder, remote controls, video games, cellular phones, pinball machines, toys and exercise equipment, garage door openers, answering machines, musical instruments, sewing machines, lighting control, paging, camera, fax machines, home computers, TVs, cable TV tuner, VCR.

Choosing a microcontroller

There are four utmost 8-bit microcontrollers. They are: Zilog’s Z8, Intel’s 8051, Freescale’s 6811, and PIC 16X from microchip Technology. Each of these microcontrollers has an especial command set and register set; therefore, they are not conflict with each other. Plan of action written for one will not run on the others. There are also 16-bit and 32-bit microcontroller’s ways by various chip makers. Three level in select microcontrollers are as follows: 1. Meeting the operation of computers needs of the task at hand efficiently and cost successfully, 2. Freedom to do something of software development tools such as assemblers, compilers, and debuggers, and 3. vast availability and dependable source of the microcontroller.


Computer stuff kit tricks of Topics 45.







Wednesday 31 May 2023

Embedded system Digital Primer


What is Digital Primer?

This section gives an overview of digital logic and sketch. First, we cover binary logic performance, and then we show gates that operate these functions. Next, logic gates are put together to form easy digital circuits. Finally, we cover some logic gadget commonly found in micro controller interfacing.

Digital primer, embedded systems, binary logic
Embedded system Digital Primer image-1

Binary logic

As mentioned earlier, computers use the binary number arrangement because the two current levels can be appearing for as the two digits zero and one. sign in digital electronics have two definite voltage levels. For example, a organization may define zero V as logic zero and +5 V as logic one. This system with the built in sufferance for difference in the voltage. A reasonable digital signal in this sample should be within either of the two fill in areas.

Logic gates

Binary logic gates are easy circuits that take one or additional input signals and sends out one output signal. Some of these gates are defined here.

AND gate

The AND gate takes two or more inputs and carry out a logic AND on them. Observation that if both inputs to the AND gate are one, the output will be one. Any other merger of inputs will give a zero output. The example appear two inputs x and y. multiple outputs are also thinkable for logic gates. In the case of AND, if all inputs are one, the output is one. If any input is 0, the output is 0.

OR gate

The OR logic task will output a one if one or more inputs is one. If all inputs are zero, then and only then will the output be zero.

Tri-state buffer

A barrier gate does not change the logic level of the input. It is used to separate or boost the signal.

Inverter

The inverter also called NOT, outputs the value reverse to that input to the gate. That is, a one input will give a zero output, while a zero input will give a one output.

XOR gate

The XOR gate executes an exclusive-OR operation on the inputs. Exclusive-OR build a one output if one input is one. If both operands are zero, the output is zero. Likewise, if both operands are one, the output is also zero. Attention from the XOR, that whenever the two inputs are the same, the output is zero. This purpose can be used to collate two bits to see if they are the same.


Computer stuff kit tricks of Topics 44.





Tuesday 30 May 2023

Introduction to computing

What is computing?

To understand the software and hardware of a microcontroller based system, one must first master some very basic concepts underlying computer design. After the logic gates, a point of view of the workings inside the computer is given.

computing, embedded system, numbering and coding systems
Introduction to computing image-1

Numbering and coding systems

Where human beings are use base 10 (decimal) arithmetic, computers work with the base 2 (binary) system. The effort depiction of binary numbers in base 16, called hexadecimal, also is covered.

Decimal and binary number systems

The binary system for used in the computers whereas because 1 and 0 represent the two voltage levels like as on and off. Whereas in base 10 there are 10 symbols, 0, 1, 2, …, 9, in base 2 there are only two, 0 and 1, are commonly mention to as bits.

Converting from decimal to binary

Primary procedure of converting from decimal to binary is to divide the decimal number by 2 repeatedly, keeping follow of the remainders. This process resume until the quotient becomes zero. The remainders are then written in change order to obtain the binary number.

Converting from binary to decimal

To transform from binary to decimal, it is major to understand the concept of mass integrated with each digit position. First, as an analogy, remember the mass of numbers in the base 10 system. By the same symbol, each digit place in a number in base 2 has a mass integrated with if.

Hexadecimal system

The hexadecimal system or base 16 as it is called in computer writings are used as a suitable depiction of binary numbers. For example, it is much quiet for a human being to constitute a string of 0’s and 1’s such as 100010010110 as its hexadecimal identical of 896H. There are two digits zero and one. The 10 digits, 0 through 9 of base 10 system. As we know base 16 hex, the first 10 digits 0 to 9 are same as in decimal, and for the remaining six digits are letters A, B, C, D, E and F are used.

Converting between binary and hex

To represent a binary number as its equivalent hexadecimal number, start from the right and group 4bits at a time, replacing each 4-bit binary number with its hex equivalent. To transform from hex to binary, all hex digit is replaced with its 4-bit binary identical.


Computer stuff kit tricks of Topics 43.




Video Editing software


How to do video editing?

Go to Google search and type video editing software, you will get many software of video editing. After download the video editing software save it and install the video editing software. If you take video from mobile or camera store memory and import into video editing software.

video editing, editing tools, graphics
Video editing software image-1

See the screen shot of video editing software application such as part one capture video have import video, import pictures and import audio or music. Part two Edit Movie have show collections, view video effects, view video transitions, make titles or credits and make an AutoMovie. Last third one is Finish Movie have save to my computer and send to DV camera.

video timeline, time frame, frame work
Video editing software image-2

From screen shot you can import video from your computer desktop hard disk data storage. After importing video then drag into the timeline format or frame. Before editing video take nice videos from your mobile or DSLR camera means digital single-lens reflex camera download into your desktop or pc, after that open video editing software and import the video which you taken video.

From timeline you can adjust with some special effects from Edit Movie select view video effects or view video transitions, timeline shows time of your video frames step by step process. If you want to add some music then download audio or music from internet, you can add in timeline there have option mute or audio.

video effects, video transitions, video graphic effects
Video editing software image 3

See screen shot about timeline format there have option mic to record audio into the video editing software. You can zoom in and zoom out as per your requirement, when click to play video it shows line to exact point of time to time frame.

Go to menu and select Tools and get few options such as Titles and credits, video effects, video transitions, create clips, take picture from preview, narrate timeline, audio levels and so on.

Video effects shows as Blur, Brightness, Decrease, Brightness, increase, Ease in, Ease out, Fade in, from Black, Fade in, From white, Fade out, To black, fade out, to white, Film age, old, Film age, older, Film Age, oldest, Film Grain, Grayscale, Hue, Cycle entire color spectrum, Mirror, horizontal, Mirror, vertical and many more.

Video transitions shows as Bars, Bow Tie, Horizontal, Bow Tie, Vertical, Checkerboard, Across, Circle, Circles, Diagonal, Box out, Diagonal, cross out, Diagonal Down Right, Diamond, Dissolve, Eye, Fade, Fan, in, Fan out, Fan up, Filled V, Down and many more.


Computer stuff kit tricks of Topics 42.

 

How to make short film video?

How to create video from camera in Maya software?

How to make color settings in Maya software?